I'm new to learning R, and I'm trying to explore a dataset provided by the R for Data Science online community for movies - https://github.com/rfordatascience/tidytuesday/blob/master/data/2018/2018-10-23/movie_profit.csv.
As I'm going through and learning more about the filter function of dplyr, I noticed that I do not get any results when I search for a value within the "distributor" column with a white space in it - like "Walt Disney" in the example below. Searching for values that do not have a white space works just fine, like "Universal".
Also, I've tried with other columns in the dataset, like "movies" where I filter for a specific movie that has white-spaces in it; however, when I do that I run into no issues so I'm a bit puzzled.
library(tidyverse)
movies <- read_csv(url("https://github.com/rfordatascience/tidytuesday/raw/master/data/2018/2018-10-23/movie_profit.csv"))
test <- "20th Century Fox"
movies %>%
filter(movie == "Dawn of the Planet of the Apes") %>%
View()
In short, I'd love to know the why behind this so that I know how to handle this if it comes up again in any future datasets that I explore. The code that is giving me trouble is below. I want to plot the genre distribution of movies from the distributor "Walt Disney".
movies <- read_csv(url("https://github.com/rfordatascience/tidytuesday/raw/master/data/2018/2018-10-23/movie_profit.csv"))
test <- "20th Century Fox"
movies %>%
filter(distributor == "Walt Disney") %>%
ggplot(aes(x = genre)) +
geom_bar()
