Can't find the openintro Lab Report template

TheRandomTexan

I'd like to use (or at least consider using) the Lab Report for OpenIntro Statistics Labs template for RMarkdown. However, after I install the openintro package and invoke it with library(), the Lab Report template does not appear as one of the RMarkdown From Template options. Somthing's missing somewhere, but what?

mine894

The openintro package is not yet on CRAN, hence needs to be installed via GitHub. To do so:

install.packages("devtools")
library(devtools)
install_github("OpenIntroStat/openintro-r-package")

Then, run library(openintro) to load the package and you should see the templates as described in the Lab. Let me know if you run into any issues, and I'd be happy to help out.

TheRandomTexan

Thanks for the instructions! that was quick. I'm one for two on this problem:

Installed OK on my university linux-based RStudio server (R 3.6.0, RStudio Pro Version 1.2.1335-1). Requires a new session to see the templates. I need to get my IT guys to put this in the System Library; if my students saw the installation they'd all drop the class and run away screaming.

Cannot get the package installed on my Windows 10 system (R 4.0.0, RStudio Version 1.3.959). After loading devtools, this happens:

> install_github("OpenIntroStat/openintro-r-package")
Downloading GitHub repo OpenIntroStat/openintro-r-package@master
These packages have more recent versions available.
It is recommended to update all of them.
Which would you like to update?

1: All
2: CRAN packages only
3: None
4: rmarkdown (2.1 -> 2.2 ) [CRAN]
5: backports (1.1.6 -> 1.1.7) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
1
rmarkdown (2.1 -> 2.2 ) [CRAN]
pkgload (NA -> 1.1.0) [CRAN]
backports (1.1.6 -> 1.1.7) [CRAN]
Installing 3 packages: rmarkdown, pkgload, backports
Installing packages into ‘C:/Users/Mike/Documents/R/win-library/4.0’
(as ‘lib’ is unspecified)

There is a binary version available but the source version is later:
binary source needs_compilation
rmarkdown 2.1 2.2 FALSE

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/pkgload_1.1.0.zip'
Content type 'application/zip' length 162448 bytes (158 KB)
downloaded 158 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/4.0/backports_1.1.7.zip'
Content type 'application/zip' length 81641 bytes (79 KB)
downloaded 79 KB

package ‘pkgload’ successfully unpacked and MD5 sums checked
Error: Failed to install 'openintro' from GitHub:
(converted from warning) cannot remove prior installation of package ‘pkgload’

At this point, I've pierced my ceiling of competence. Can pkgload be removed at gunpoint?

mine894

Even though it says it's recommended you update all, would you mind doing the following: Press 2 at the prompt to update only CRAN packages. If the issue persists, let me know. This might mean getting the package installed from GitHub is getting trickier and I should get it to CRAN asap.

TheRandomTexan

Bingo!

It's a bit trickier than just rerunning and pressing 2, but not much.

My first attempt balked with errors in trying to replace the 'backports' and 'pkgload' packages. I removed them via the RStudio Packages panel, then reinstalled via Tools > Install Packages... THEN loaded 'devtools' followed by installing 'openintro' (and pressing 2). Started a new session, ran library(openintro) and voila! The templates are there and working. Thanks for pointing me in the right direction--at 3:35am.

TheRandomTexan

I've just updated my R and RStudio applications, and the openintro package needed updating as a result. Still not on CRAN in the workable version. When I initially tried to install from GitHub (see previous posts), it balked with an error for the xfun package. The fix is to install xfun 0.17 from source, then reattemp the install_GitHub(). Worked for me.

TheRandomTexan

Oops! I forgot to add: THANKS FOR THE LAB REPORT TEMPLATE!! I use this for most of my R Lab assignments now; they're very easy to align with assignments AND a grading rubric. Just the ticket for my asynchronous online courses. I thank you, my teaching assistant thanks you.

mine894

Could you share the result of running sessionInfo()?

The lab template is available to me in the CRAN version of OpenIntro so this might help chase what the issue might be on your end.

TheRandomTexan

OK. You've pierced the ceiling of my expertise, but maybe there's clue here.

> sessionInfo()
R version 4.0.2 (2020-06-22)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19041)

Matrix products: default

Random number generation:
RNG: Mersenne-Twister
Normal: Inversion
Sample: Rounding

locale:
[1] LC_COLLATE=English_United States.1252
[2] LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C
[5] LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] devtools_2.3.1 usethis_1.6.1

loaded via a namespace (and not attached):
[1] rstudioapi_0.11 knitr_1.29 magrittr_1.5 pkgload_1.1.0
[5] R6_2.4.1 rlang_0.4.7 fansi_0.4.1 tools_4.0.2
[9] pkgbuild_1.1.0 xfun_0.17 sessioninfo_1.1.1 cli_2.0.2
[13] withr_2.2.0 htmltools_0.5.0 ellipsis_0.3.1 remotes_2.2.0
[17] yaml_2.2.1 assertthat_0.2.1 digest_0.6.25 rprojroot_1.3-2
[21] crayon_1.3.4 processx_3.4.4 callr_3.4.4 fs_1.5.0
[25] ps_1.3.4 curl_4.3 testthat_2.3.2 memoise_1.1.0
[29] glue_1.4.2 evaluate_0.14 rmarkdown_2.3 compiler_4.0.2
[33] desc_1.2.0 backports_1.1.9 prettyunits_1.1.1

Register to Add a Comment