KLI Seminar 2023
custom_functions.R
file was pretty massive and needed many R packages that many of you had not installeddependencies
package… however, that does not work if you are using different versions of packages!
groundhog
packagegroundhog
package in R is used for managing the package dependencies in an R script with specific requirements for package versionsgroundhog
package allows users to load packages from a specific date in the pastlibrary()
function, users can load a version of the package that was current as of a specific dategroundhog
packageInstead of: | library(pkg) |
Do this: | groundhog.library(pkg, date) |
groundhog
packagegroundhog
packageLearn how to use it here
Commands | Operations |
---|---|
git init <directory> |
Create empty Git repo in specified directory |
git clone <repository> |
Clone a repository located at |
git config user.name <username> |
Define author name to be used for all commits in current repository |
git add <directory> |
Stage all changes in |
Commands | Operations |
---|---|
git commit -m <"message"> |
Commit the staged snapshot, but instead of launching a text editor, use <“message”> as the commit message |
git status |
List which files are staged, unstaged, and untracked |
git log |
Display the entire commit history using the default format |
Commands | Operations |
---|---|
git pull <remote> |
Fetch the specified remote’s copy of current branch and immediately merge it into the local copy |
git push <remote> <branch> |
Upload local repository content to a remote repository |
Pull requests |
|
Issues |
|
[Get Git and GitHub running]
(Re)structure your project based on yesterday’s instructions
Connect your local R project folder with a GitHub repository
Change some of the content in R, save, and then push the changes to GitHub
.Rproj.user
.Rhistory
.RData
# Data preparation folder
/Data_prep
# Some folders
/Manuscript_cache
/Tables
/Manuscript_files
/OLD
# Manuscript file
Manuscript.docx
You will get the chance to work on your own data analysis project
For this, you will have ~ 30 minutes to prepare the folder structure tomorrow
You may use either the example material or work on your own projects