Hi Guys,
I am very new to data science, and even more new to R studio, unfrotunateley i am not being able to run my first script.
The downloaded binary packages are in
/var/folders/d4/n9lccmwn1w3dkk42c1ljqbh80000gn/T//RtmprAdHiG/downloaded_packages
murders %>%
ggplot(aes(population, total, label = abb, color = region)) +
geom_point()
Error in murders %>% ggplot(aes(population, total, label = abb, color = region)) :
could not find function "%>%"
murders %>%
ggplot(aes(population, total, label = abb, color = region)) +
geom_point() +
geom_text(check_overlap = TRUE)
Error in murders %>% ggplot(aes(population, total, label = abb, color = region)) :
could not find function "%>%"
these are the errors i am getting, I am running a CATALINA OS 10.15.4
I have installed the latest R studio in the beginning, but i uninstalled it , to re-install an earlier version and i am still facing the same issues , i need some help here.
thanks
looks like you have not loaded the package where the %>% “pipe” operator comes from. The operator comes from magrittr. However I would recommend to load all the basic tidyverse packages with library(tidyverse)
library(tidyverse)
mpg %>% select(manufacturer)
#> # A tibble: 234 x 1
#> manufacturer
#> <chr>
#> 1 audi
#> 2 audi
#> 3 audi
#> 4 audi
#> 5 audi
#> 6 audi
#> 7 audi
#> 8 audi
#> 9 audi
#> 10 audi
#> # ... with 224 more rows
If this is works as well. Could you post a reprex?
I tried to Load the reprex package and i got an error as well
library(reprex)
library(reprex)
Error: package or namespace load failed for ‘reprex’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]):
there is no package called ‘fs’
that's why i was not able to produce a reprex to post it here
Looks like the packages are not installed in a proper way. I do not know a lot about problems with that. One package that seems to be missing is fs but maybe there are more.
You could try first: install.packages("reprex")
and I guess dependecies (like fs) should be installed. If you want to make sure that fs is installed: install.packages("fs")
to install these packages.
However, as I said, maybe there are further problems with the installation, and you would need help from somebody else on community.rstudio.com.