6 Credit

6.1 GridCAT

This example pipeline uses the data that accompanies the GridCAT toolbox.

Here is the reference to the toolbox:

Stangl, M., Shine, J., & Wolbers, T. (2017). The GridCAT: A Toolbox for Automated Analysis of Human Grid Cell Codes in fMRI. Frontiers in Neuroinformatics, 11. https://doi.org/10.3389/fninf.2017.00047

The data can be downloaded from here.

6.2 Publishing on GitHub Pages

To be able to host the HTML output using GitPages, we need to include a file called .nojekyll in the docs folder where the HTML documentation is stored.

Let’s create this file if it doesn’t exist yet.

if (!file.exists(here("docs", ".nojekyll"))){
  file.create(here("docs", '.nojekyll'))
}  

6.3 List of R packages

Here is a list of packages used in the analysis and references to them. It is created using the grateful package.

Unfortunately, not all packages provide all information, so there are a few warning messages. The code below generates a markdown file with references that we read in and print below.

if(!file.exists(here("code", "apa-6th-edition.csl"))){
  grateful::get_csl("apa-6th-edition")
  file.copy(from=here("apa-6th-edition.csl"), to=here("code", "apa-6th-edition.csl"))
  
}

pkgs <- grateful::cite_packages(citation.style = "apa-6th-edition", output = "table")
knitr::kable(pkgs)
Package Version Citation
assertthat 0.2.1 Wickham (2019)
base 4.2.0 R Core Team (2022a)
bookdown 0.26 Xie (2016); Xie (2022a)
circular 0.4.95 Agostinelli and Lund (2022)
cowplot 1.1.1 Wilke (2020)
fslr 2.25.2 @
grateful 0.1.11 Rodríguez-Sánchez, Jackson, and Hutchins (2022)
here 1.0.1 Müller (2020)
knitr 1.39 Xie (2014); Xie (2015); Xie (2022b)
oro.nifti 0.11.4 Whitcher, Schmid, and Thornton (2011)
remotes 2.4.2 Csárdi et al. (2021)
rmarkdown 2.14 Xie, Allaire, and Grolemund (2018); Xie, Dervieux, and Riederer (2020); Allaire et al. (2022)
tidyverse 1.3.1 Wickham et al. (2019)
tools 4.2.0 R Core Team (2022b)
useful 1.2.6 Lander (2018)

6.4 Session Info

Lastly, we run session info, using the version from the devtools package.

sessionInfo()
## R version 4.2.0 (2022-04-22)
## Platform: x86_64-pc-linux-gnu (64-bit)
## Running under: Debian GNU/Linux 11 (bullseye)
## 
## Matrix products: default
## BLAS:   /afs/cbs.mpg.de/software/r/4.2.0/debian-bullseye-amd64/lib/R/lib/libRblas.so
## LAPACK: /afs/cbs.mpg.de/software/r/4.2.0/debian-bullseye-amd64/lib/R/lib/libRlapack.so
## 
## locale:
##  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C               LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8     LC_MONETARY=en_US.UTF-8    LC_MESSAGES=en_US.UTF-8    LC_PAPER=en_US.UTF-8      
##  [8] LC_NAME=C                  LC_ADDRESS=C               LC_TELEPHONE=C             LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C       
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] grateful_0.1.11  remotes_2.4.2    circular_0.4-95  useful_1.2.6     cowplot_1.1.1    fslr_2.25.2      neurobase_1.32.2 oro.nifti_0.11.4 here_1.0.1       forcats_0.5.1    stringr_1.4.0   
## [12] dplyr_1.0.9      purrr_0.3.4      readr_2.1.2      tidyr_1.2.0      tibble_3.1.7     ggplot2_3.3.6    tidyverse_1.3.1  bookdown_0.26   
## 
## loaded via a namespace (and not attached):
##  [1] nlme_3.1-157       bitops_1.0-7       matrixStats_0.62.0 fs_1.5.2           lubridate_1.8.0    bit64_4.0.5        httr_1.4.3         rprojroot_2.0.3    tools_4.2.0        backports_1.4.1   
## [11] bslib_0.3.1        utf8_1.2.2         R6_2.5.1           DBI_1.1.2          mgcv_1.8-40        colorspace_2.0-3   withr_2.5.0        tidyselect_1.1.2   bit_4.0.4          compiler_4.2.0    
## [21] cli_3.3.0          rvest_1.0.2        xml2_1.3.3         labeling_0.4.2     sass_0.4.1         scales_1.2.0       mvtnorm_1.1-3      digest_0.6.29      rmarkdown_2.14     R.utils_2.12.0    
## [31] RNifti_1.4.0       pkgconfig_2.0.3    htmltools_0.5.2    dbplyr_2.1.1       fastmap_1.1.0      highr_0.9          rlang_1.0.2        readxl_1.4.0       rstudioapi_0.13    jquerylib_0.1.4   
## [41] generics_0.1.2     farver_2.1.0       jsonlite_1.8.0     vroom_1.5.7        R.oo_1.25.0        magrittr_2.0.3     Matrix_1.4-1       Rcpp_1.0.8.3       munsell_0.5.0      fansi_1.0.3       
## [51] abind_1.4-5        lifecycle_1.0.1    R.methodsS3_1.8.2  stringi_1.7.6      yaml_2.3.5         plyr_1.8.7         grid_4.2.0         parallel_4.2.0     crayon_1.5.1       lattice_0.20-45   
## [61] haven_2.5.0        splines_4.2.0      hms_1.1.1          knitr_1.39         pillar_1.7.0       boot_1.3-28        reprex_2.0.1       glue_1.6.2         evaluate_0.15      renv_0.16.0       
## [71] modelr_0.1.8       vctrs_0.4.1        tzdb_0.3.0         cellranger_1.1.0   gtable_0.3.0       assertthat_0.2.1   xfun_0.30          broom_0.8.0        ellipsis_0.3.2

6.5 Bibliography

Agostinelli, C., and U. Lund. 2022. R Package circular: Circular Statistics (Version 0.4-95). CA: Department of Environmental Sciences, Informatics; Statistics, Ca’ Foscari University, Venice, Italy. UL: Department of Statistics, California Polytechnic State University, San Luis Obispo, California, USA. https://r-forge.r-project.org/projects/circular/.
Allaire, JJ, Yihui Xie, Jonathan McPherson, Javier Luraschi, Kevin Ushey, Aron Atkins, Hadley Wickham, Joe Cheng, Winston Chang, and Richard Iannone. 2022. Rmarkdown: Dynamic Documents for r. https://github.com/rstudio/rmarkdown.
Csárdi, Gábor, Jim Hester, Hadley Wickham, Winston Chang, Martin Morgan, and Dan Tenenbaum. 2021. Remotes: R Package Installation from Remote Repositories, Including ’GitHub’. https://CRAN.R-project.org/package=remotes.
Lander, Jared P. 2018. Useful: A Collection of Handy, Useful Functions. https://CRAN.R-project.org/package=useful.
Müller, Kirill. 2020. Here: A Simpler Way to Find Your Files. https://CRAN.R-project.org/package=here.
R Core Team. 2022a. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.
———. 2022b. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing. https://www.R-project.org/.
Rodríguez-Sánchez, Francisco, Connor P. Jackson, and Shaurita D. Hutchins. 2022. Grateful: Facilitate Citation of r Packages. https://github.com/Pakillo/grateful.
Whitcher, Brandon, Volker J. Schmid, and Andrew Thornton. 2011. “Working with the DICOM and NIfTI Data Standards in R.” Journal of Statistical Software 44 (6): 1–28. https://doi.org/10.18637/jss.v044.i06.
Wickham, Hadley. 2019. Assertthat: Easy Pre and Post Assertions. https://CRAN.R-project.org/package=assertthat.
Wickham, Hadley, Mara Averick, Jennifer Bryan, Winston Chang, Lucy D’Agostino McGowan, Romain François, Garrett Grolemund, et al. 2019. “Welcome to the tidyverse.” Journal of Open Source Software 4 (43): 1686. https://doi.org/10.21105/joss.01686.
Wilke, Claus O. 2020. Cowplot: Streamlined Plot Theme and Plot Annotations for ’Ggplot2’. https://CRAN.R-project.org/package=cowplot.
Xie, Yihui. 2014. “Knitr: A Comprehensive Tool for Reproducible Research in R.” In Implementing Reproducible Computational Research, edited by Victoria Stodden, Friedrich Leisch, and Roger D. Peng. Chapman; Hall/CRC. http://www.crcpress.com/product/isbn/9781466561595.
———. 2015. Dynamic Documents with R and Knitr. 2nd ed. Boca Raton, Florida: Chapman; Hall/CRC. https://yihui.org/knitr/.
———. 2016. Bookdown: Authoring Books and Technical Documents with R Markdown. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/bookdown.
———. 2022a. Bookdown: Authoring Books and Technical Documents with r Markdown. https://github.com/rstudio/bookdown.
———. 2022b. Knitr: A General-Purpose Package for Dynamic Report Generation in r. https://yihui.org/knitr/.
Xie, Yihui, J. J. Allaire, and Garrett Grolemund. 2018. R Markdown: The Definitive Guide. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown.
Xie, Yihui, Christophe Dervieux, and Emily Riederer. 2020. R Markdown Cookbook. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown-cookbook.