library(tidyverse) # grafico base cars %>% ggplot(aes(x = speed, y = dist)) + geom_point() library(carData) # differenza fra geom e aes SLID %>% na.omit() %>% # ometto i casi mancanti ggplot(aes(x = language)) + geom_bar(fill = "orange") # indico un colore SLID %>% na.omit() %>% ggplot(aes(x = language, fill = language)) + # mappo una variabile geom_bar() SLID %>% na.omit() %>% ggplot() + geom_bar(aes(x = language, fill = sex)) # mappo un'altra variabile