hello can anyone help me with the following problem?
I want a line of graphic. I want the horizontal line to be the year.
I want different lines with different genres.
I want to know which genre scores best on which year
I really hope someone can help me with this problem.
Below I have made an outline of the code.
I only get an error:
Error in FUN (X [[i]], ...): object 'EU_Sales' not found
And I do not understand why he indicates this error message
Jaar <- videogames %>%
filter(Platform %in% c("NES", "SNES" , "N64", "Wii", "WiiU", "GB", "GBA", "GC", "3DS", "DS", "3DS")) %>%
group_by(Platform, Year, EU_Sales) %>%
summarize(total = sum(EU_Sales))
#kolomen maken met alleen jaar/platform/EU_salas
Jaar %>%
group_by(Platform, Year) %>%
summarize(total = sum( EU_Sales)) %>%
ggplot(aes(x = Year, y = EU_Sales)) +
geom_point(alpha = 0.5, pch = 21) +
geom_point(data = Jaar, aes(col = Platform), size = 1.5) +
geom_line(data = Jaar, aes(col = Platform), size = 1.3) +
scale_color_viridis(discrete = TRUE) +
theme(legend.position = c(0.2, 0.7)) +
labs(title = "Verkoop over de Jaren", y = "Europa Sales")