First, you need to check your code for obvious syntax errors and typos e.g.
You can't call several libraries within a single library()
call and the correct package names are ggplot2
and tidyverse
.
Also, dplyr
and ggplot2
work with data frames not with vectors like the one you have provided as sample data, please check again and try to provide a proper REPRoducible EXample (reprex)