├── .nojekyll ├── figures ├── marwick_workflow.png ├── screenshot_rrtools.png ├── screenshot_rstudio.png ├── marwick_T_Pi_researcher.png └── Data-Managerment-title-slide-16-9.jpg ├── rrtools.tutorial.mpi2020.Rproj ├── pkgname └── .Rprofile ├── .gitignore ├── LICENSE ├── styles.css └── index.Rmd /.nojekyll: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /figures/marwick_workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/rrtools.tutorial.mpi2020/master/figures/marwick_workflow.png -------------------------------------------------------------------------------- /figures/screenshot_rrtools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/rrtools.tutorial.mpi2020/master/figures/screenshot_rrtools.png -------------------------------------------------------------------------------- /figures/screenshot_rstudio.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/rrtools.tutorial.mpi2020/master/figures/screenshot_rstudio.png -------------------------------------------------------------------------------- /figures/marwick_T_Pi_researcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/rrtools.tutorial.mpi2020/master/figures/marwick_T_Pi_researcher.png -------------------------------------------------------------------------------- /figures/Data-Managerment-title-slide-16-9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nevrome/rrtools.tutorial.mpi2020/master/figures/Data-Managerment-title-slide-16-9.jpg -------------------------------------------------------------------------------- /rrtools.tutorial.mpi2020.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: Sweave 13 | LaTeX: pdfLaTeX 14 | 15 | BuildType: Website 16 | -------------------------------------------------------------------------------- /pkgname/.Rprofile: -------------------------------------------------------------------------------- 1 | cat(crayon::bold(' 2 | This project was set up by rrtools. 3 | ')) 4 | cat(' 5 | You can start working now or apply some more basic configuration. 6 | ') 7 | cat('Check out ') 8 | cat(crayon::underline('https://github.com/benmarwick/rrtools')) 9 | cat(' for an explanation of all the project configuration functions of rrtools. 10 | ') 11 | cat('Or run the rrtools configuration addin: ') 12 | cat(crayon::cyan('rrtools.addin::rrtools_assistant() ')) 13 | cat(crayon::underline('https://github.com/nevrome/rrtools.addin 14 | 15 | ')) 16 | invisible(file.remove('.Rprofile')) 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # History files 2 | .Rhistory 3 | .Rapp.history 4 | 5 | # Session Data files 6 | .RData 7 | 8 | # User-specific files 9 | .Ruserdata 10 | 11 | # Example code in package build process 12 | *-Ex.R 13 | 14 | # Output files from R CMD build 15 | /*.tar.gz 16 | 17 | # Output files from R CMD check 18 | /*.Rcheck/ 19 | 20 | # RStudio files 21 | .Rproj.user/ 22 | 23 | # produced vignettes 24 | vignettes/*.html 25 | vignettes/*.pdf 26 | 27 | # OAuth2 token, see https://github.com/hadley/httr/releases/tag/v0.3 28 | .httr-oauth 29 | 30 | # knitr and R markdown default cache directories 31 | *_cache/ 32 | /cache/ 33 | 34 | # Temporary files created by R markdown 35 | *.utf8.md 36 | *.knit.md 37 | 38 | # R Environment Variables 39 | .Renviron 40 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Clemens Schmid 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /styles.css: -------------------------------------------------------------------------------- 1 | p { 2 | font-size: 20px !important; 3 | } 4 | 5 | li { 6 | font-size: 20px !important; 7 | } 8 | 9 | details { 10 | font-size: 20px !important; 11 | } 12 | 13 | #main .nav-pills > li.active > a, 14 | #main .nav-pills > li.active > a:hover, 15 | #main .nav-pills > li.active > a:focus { 16 | background-color: #22983B; 17 | } 18 | 19 | #main .nav-pills > li > a:hover { 20 | background-color: #22983B; 21 | } 22 | 23 | h1,h2,h3,h4,h5,h6,legend{ 24 | color: #22983B; 25 | } 26 | 27 | #nav-top span.glyphicon { 28 | color: #22983B; 29 | } 30 | 31 | #table-of-contents header{ 32 | color:#22983B; 33 | } 34 | 35 | #table-of-contents h2{ 36 | background-color:#22983B; 37 | } 38 | 39 | #main a { 40 | background-image: linear-gradient(180deg,#d64a70,#d64a70); 41 | color:#c7254e; 42 | } 43 | 44 | a:hover{ 45 | color:#3d1308 46 | } 47 | 48 | a:visited{ 49 | color:#3d1308 50 | } 51 | 52 | #table-of-contents { 53 | background:#3D3D3D !important; 54 | } 55 | 56 | #sidebar { 57 | background:#3D3D3D !important; 58 | } 59 | 60 | #sidebar h2{ 61 | background-color:#22983B !important; 62 | } 63 | 64 | #postamble { 65 | background:#3F88C5 !important; 66 | border-top:solid 10px #3D3D3D; 67 | } 68 | 69 | 70 | /* scroll gallery */ 71 | .gallery { 72 | display: flex; 73 | height: 90vh; 74 | overflow-x: scroll; 75 | scroll-snap-type: x mandatory; 76 | margin-top: 30px; 77 | margin-bottom: 30px; 78 | border-style: solid; 79 | border-width: 1px; 80 | border-color: lightgrey; 81 | } 82 | 83 | .gallery div { 84 | scroll-snap-align: start; 85 | min-width: 700px; 86 | justify-content: center; 87 | align-items: center; 88 | padding-left: 20px; 89 | padding-right: 20px; 90 | margin-right: 20px; 91 | } 92 | 93 | -------------------------------------------------------------------------------- /index.Rmd: -------------------------------------------------------------------------------- 1 | --- 2 | name: "rrtools.tutorial.mpi2020" 3 | output_dir: "." 4 | author: Clemens Schmid 5 | date: January 2020 6 | title: Research Compendia with R 7 | output: 8 | rmdformats::readthedown: 9 | code_folding: NULL 10 | self_contained: true 11 | thumbnails: false 12 | lightbox: false 13 | css: styles.css 14 | editor_options: 15 | chunk_output_type: console 16 | --- 17 | 18 | ```{r setup, include=FALSE} 19 | knitr::opts_chunk$set(eval = FALSE) 20 | 21 | astro <- function() { 22 | fontawesome::fa("user-astronaut", fill = "#c7254e") 23 | } 24 | rocket <- function() { 25 | fontawesome::fa("rocket", fill = "#c7254e") 26 | } 27 | ``` 28 | 29 | [**https://nevrome.github.io/rrtools.tutorial.mpi2020**](https://nevrome.github.io/rrtools.tutorial.mpi2020) 30 | Github: https://github.com/nevrome/rrtools.tutorial.mpi2020 31 | 32 | ![](figures/Data-Managerment-title-slide-16-9.jpg) 33 | 34 | This tutorial was compiled by [Clemens Schmid](https://nevrome.de/) for a [workshop on reproducible research and data management at MPI-SHH](https://rrdm-shh.github.io) in January 2020. It's based on and inspired by two workshops prepared by [Ben Marwick](http://faculty.washington.edu/bmarwick/) for the [SAA2019 conference](https://benmarwick.github.io/2019-04-10-saa/) and [Brown University Digital Archaeology Lab](https://benmarwick.github.io/2019-12-09-brown/). 35 | 36 | # The research compendium 37 | 38 | 111 | 112 | The following figure by [Marwick 2017](https://www.practicereproducibleresearch.org/case-studies/benmarwick.html) illustrates one implementation of this workflow. 113 | 114 |
115 | 116 |
117 | 118 | # R for reproducible research 119 | 120 | 226 | 227 | # rrtools setup 228 | 229 | 329 | 330 | # rrtools workflow 331 | 332 | 415 | 416 | # rrtools advanced 417 | 418 | 496 | 497 | # Further reading 498 | 499 |

Eglen, S. J., Marwick, B., Halchenko, Y. O., Hanke, M., Sufi, S., Gleeson, P., … & Wachtler, T. (2017). Toward standard practices for sharing computer code and programs in neuroscience. Nature Neuroscience 20(6), 770-773. [DOI] [preprint] [PDF]

500 | 501 |

Marwick, B. 2017 Computational reproducibility in archaeological research: Basic principles and a case study of their implementation. Journal of Archaeological Method and Theory 24(2), 424-450. [DOI] [preprint] [code & data]

502 | 503 |

Marwick 2017 Using R and Related Tools for Reproducible Research in Archaeology. In Kitzes, J., Turek, D., & Deniz, F. (Eds.) The Practice of Reproducible Research: Case Studies and Lessons from the Data-Intensive Sciences. Oakland, CA: University of California Press. [online]

504 | 505 |

Marwick, B., & Birch, S. 2018 A Standard for the Scholarly Citation of Archaeological Data as an Incentive to Data Sharing. Advances in Archaeological Practice 1-19. [DOI] [preprint] [PDF] [code & data]

506 | 507 |

Marwick, B., Boettiger, C., & Mullen, L. 2017 Packaging data analytical work reproducibly using R (and friends). The American Statistician [DOI] [preprint]

508 | 509 |

Marwick, B, d’Alpoim Guedes, J., Barton, C. M., Bates, L. A., Baxter, M., Bevan, A., Bollwerk, E. A., Bocinsky, R. K., Brughmans, T., Carter, A. K., Conrad, C., Contreras, D. A., Costa, S., Crema, E. R., Daggett, A., Davies, B., Drake, B. L., Dye, T. S., France, P., Fullagar, R., Giusti, D., Graham, S., Harris, M. D., Hawks, J., Health, S., Huffer, D., Kansa, E. C., Kansa, S. W., Madsen, M. E., Melcher, J., Negre, J., Neiman, F. D., Opitz, R., Orton, D. C., Przstupa, P., Raviele, M., Riel-Savatore, J., Riris, P., Romanowska, I., Smith, J., Strupler, N., Ullah, I. I., Van Vlack, H. G., VanValkenburgh, N., Watrall, E. C., Webster, C., Wells, J., Winters, J., and Wren, C. D. (2017) Open science in archaeology. SAA Archaeological Record, 17(4), pp. 8-14. [PDF] [preprint]

510 | 511 |

Ram, K. B. Marwick 2017 Building Towards a Future Where Reproducible, Open Science is the Norm. In Kitzes, J., Turek, D., & Deniz, F. (Eds.) The Practice of Reproducible Research: Case Studies and Lessons from the Data-Intensive Sciences. Oakland, CA: University of California Press. [online]

512 | 513 |

Rokem, A., B. Marwick, V. Staneva 2017 Assessing Reproducibility. In Kitzes, J., Turek, D., & Deniz, F. (Eds.) The Practice of Reproducible Research: Case Studies and Lessons from the Data-Intensive Sciences. Oakland, CA: University of California Press. University of California Press. [online]

514 | 515 | --------------------------------------------------------------------------------