#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}
# filter rows with or
korea_or_before_2000 <- artists %>% filter(country == 'South Korea' | year_founded < 2000)
korea_or_before_2000
```
```{r}
# filter rows with not !
not_rock_groups <- artists %>% filter(!(genre == 'Rock'))
not_rock_groups
```
No comments:
Post a Comment