Showing 0 to 0 of 0 entries under movies comedy tab of source window.
Title
Question
Screenshot:- https://photos.app.goo.gl/i7iENquXvsnHz38r5
library(dplyr)
# Clear R workspace<img>
rm(list = ls() )
# Declare a variable to read and store moviesData
movies <- read.csv("moviesData.csv")
# View movies data frame
View(movies)
moviesComedy <- filter(movies,
genre == "comedy")
View(moviesComedy)
Console:-
> # Clear R workspace
> rm(list = ls() )
> # Declare a variable to read and store moviesData
> movies <- read.csv("moviesData.csv")
> # View movies data frame
> View(movies)
> library(dplyr)
Attaching package: ‘dplyr’
The following objects are masked from ‘package:stats’:
filter, lag
The following objects are masked from ‘package:base’:
intersect, setdiff, setequal, union
> moviesComedy <- filter(movies,
+ genre == "comedy")
> View(moviesComedy)
> moviesComedy <- filter(movies,
+ genre == "comedy")
> View(moviesComedy)
R Data-Manipulation-using-dplyr-Package 06-07 min 20-30 sec
Answers:
Use the exact column names. You have written, "comedy" instead of "Comedy" with "C" capital.
Kindly try the following command -
filter(movies, genre == "Comedy")
Login to add comment