csgillespie / efficientR

Efficient R programming: a book
https://csgillespie.github.io/efficientR/
Other
720 stars 373 forks source link

browse Vignettes #301

Open sciencecasey opened 3 years ago

sciencecasey commented 3 years ago

I installed the package as describe in section 1.7. When I tried to use the browseVignettes() line, it said no package called efficient. I then tried attaching the package by calling library(). I had output that said that if I wanted vignettes, to set vignettes = TRUE. Thus, I tried reinstalling by devtools line suggested and when I did so, it didn't build. Then it told me to set force = TRUE to force the build, however the vignette build still failed with teh warning that the YAML metadata didn't match. Screen Shot 2021-03-22 at 6 22 59 PM Screen Shot 2021-03-22 at 6 23 29 PM

Robinlovelace commented 3 years ago

Thanks for the report @sciencecasey. I'm not sure what the cause is. Any ideas @csgillespie ? Cheers.

csgillespie commented 3 years ago

Not sure what's happening. @sciencecasey Can you install the suggested missing packages and try again?

sciencecasey commented 3 years ago

Hi @csgillespie I'm sorry but I don't know what you mean. This was my third attempt to install the efficient library and it's installed other than the vignettes. I started a new R session and the same errors occur, only at the Vignette level.

I uninstalled the package with "remove.packages()" and then reinstalled with the full vignette = TRUE and got the error again. Is there another location to view the vignettes, as they don't appear to be working on my build? (For reference, I'm on R Version 4.0.3 and RStudio 1.4.1103 on a Mac 10.14.6 OS.

csgillespie commented 3 years ago

@sciencecasey In the error messages, it states some missing packages, e.g. benchmarkme, pryr,

Would you install them (and any others) first?

Your version of R and RStudio should be fine. But I don't have a Mac.

Robinlovelace commented 3 years ago

It may also be because of recent updates on CRAN creating a difference between binary and source versions. Sounds like a package installation issue to me also. Good suggestion on another location for the vignettes though, as you'll see the project has kind of slowed down recently although I'm keen to get it moving again. Any further feedback or pull requests v. welcome.

engineerchange commented 3 years ago

Hi @sciencecasey, there was a minor change made to this line about a year ago; you may be referencing a printed copy and not the latest revision at https://csgillespie.github.io/efficientR/introduction.html#book-resources.

Try: devtools::install_github("csgillespie/efficient", build_vignettes = TRUE, dependencies = TRUE)

sciencecasey commented 3 years ago

Hi everyone, Thank you for the responses! I was looking online at the book but apparently it was an older version. When I uninstalled and reinstalled with the line from engineerchange it worked fine! I'm looking forward to working through the book. If I see any pull request needs I would be happy to contribute. -Casey