I'm very new to R and recently installed R-studio. I'm trying to familiarize myself with packages by using browseVignettes()
but it isn't returning anything for the package ggplot2
, which I know contains vignettes from a tutorial video.
When I try using browseVignettes
with certain packages in the system library, I receive an error message, e.g.:
> browseVignettes("stats")
No vignettes found by browseVignettes("stats")
By contrast, I receive no error message when attempting to access the vignettes of ggplot2
.
My theory is that I installed the package incorrectly. When I went through the installation, I received the below message.
> install.packages("ggplot2")
Installing package into ‘C:/Users/micha/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/ggplot2_3.3.0.zip'
Content type 'application/zip' length 4015425 bytes (3.8 MB)
downloaded 3.8 MB
package ‘ggplot2’ successfully unpacked and MD5 sums checked
The downloaded binary packages are in
C:\Users\micha\AppData\Local\Temp\RtmpyYnCz3\downloaded_packages
Any assistance would be much appreciated, as I am hoping to be able to review these vignettes and avoid this error repeating itself next time I install a package from CRAN.
Welcome to R. There is a bit of a learning curve, but it is very powerful once you get the hang of it.
The installation of ggplot2
looks like it went according to plan. One way to check is to run library(ggplot2)
in the console. If you do not get an error then it is installed correctly.
browseVignettes("ggplot2")
should open a browser window with a list of the available vignettes (only 3 in this case). It does so silently, so that is why you did not get a message–error or otherwise.
Not all packages have vignettes, as you have already discovered with the "stats" package.