A lab journal template for students following courses using RStudio and Git (https://robfranken.github.io/LabJournal/). To use this, follow the steps below.
- Make sure R and R-studio are installed;
- Make sure the
rmarkdown
-package is installed in R-studio (with "install dependencies"); - Make sure GitHub Desktop is installed and connected to your GitHub account.
- Fork the repository using the fork button in the top right hand corner of Github, to make a personal copy of this lab journal;
- Under your repository name, navigate to 'Settings'; click on 'Pages' on the sidebar; select the main-branch as your publishing source, and serve from the 'docs'-folder.
You now have a personal copy of this repository on your account, which serves html files (aka Github pages) as a website.
Navigate to 'Settings'; click on 'Collaborators', and invite the lectures of your course (e.g. JochemTolsma, bhofstra, robfranken, ammulders). After acceptance, the lecturers have access to you repository and can make contributions.
- Using GitHub desktop, clone the forked lab journal repository to your local path;
- Specify that you want to use the forked repository for your own purposes.
The forked repository at your local path contains all of the files you need. All you need for it to work is (the latest version of) R and R-studio installed.
- Right-click on the repository name and click 'Open in Rstudio'; alternately, you can navigate to the repository at your local path and open the 'labjournal.Rproj' file. This should automatically open R-studio, and your current working environment will be inside this project.
- Inside R-studio you should see a files tab in the bottom right hand corner;
- Customize the 'index.Rmd' as you wish within R-studio, to make it your own;
- Make sure to install the
remotes
andklippy
packages. Commands are included in the index.Rmd. - Journal your work using .Rmd-files.
To maintain your personal notes and working scripts separately, create a dedicated folder. If you don't want this folder to be accessible to others, remember to add its name to the '.gitignore' file. Additionally, modify your 'site.yml' to ensure that the same content is excluded there as well. Keep in mind that any items within this folder will not be compiled.
- Recompile the lab journal website using the build function in the top right hand corner;
- Commit your changes and push them to GitHub using GitHub Desktop.
- Your personal lab journal website will be published at: https://{USERNAME}.github.io/LabJournal/
- Working with Git and GitHub Desktop
- Getting the hang of R Markdown: The Definitive Guide and Cookbook