Quotes help make search much faster. Example: "Practice Makes Perfect"

Wednesday, September 4, 2019

Codecademy Learn R Excluding Columns 8/12


#Sample Solution
---
title: "Introduction to Data Frames in R"
output: html_notebook
---

```{r message=FALSE, warning=FALSE}
# load libraries
library(readr)
library(dplyr)
```

```{r message=FALSE}
# load data frame
artists <- read_csv('artists.csv')
```

```{r}
# select all columns except one
no_albums <- artists %>% select(-albums)
no_albums
```

```{r}
# select all columns except a set
df_cols_removed <- artists %>% select(-genre,-spotify_monthly_listeners,-year_founded)
df_cols_removed
```

No comments:

Post a Comment


This is an example of scrolling text using Javascript.

Popular Posts