Resources for analyzing data for CAP (cognition and affect during the COVID-19 pandemic) project.
Please make sure that you have recent versions of R and RStudio installed. If you plan to use GitHub Desktop, please follow these installation instructions if you have not already done so.
To contribute to this project, please clone the repository to your local machine. You can do this using the green Code button with a dropdown menu. There are two preferred methods, and we recommend using whichever you prefer:
Click Open with GitHub Desktop, and pick a location in your personal file system to store it using the GitHub Desktop cloning interface. If using Linux, please see option 2.
If using Linux or prefer the command line, run the following line within your projects directory:
git clone https://github.com/sokolhessnerlab/cap.git
With the repository cloned to your computer, open the cap.Rproj
file, which should start a session for you in RStudio.
With the project open in RStudio, copy-and-paste the following line of R code into your RStudio's Console and press enter.
Sys.info()["user"]
The string value returned will be your system's name, which is what the configuration file will use to determine your paths to data and the like. You should then replace the user
tag in config.yml
for your system user, and remove the #
comment strings. You can see Ari's system user metis
as an example.
To use the configured information, you must install the config
package using install.packages('config')
in the R console. Then, when needed, load the package in your scripts or RMarkdown files:
library(config)
And then you can access the config
object by getting and assigning it to a variable config
.
config <- config::get()
For example, you access the path to data using config$path$data
. Please use this method for paths instead of hard-coding them!
Code for cleaning, combining, and exclusion
- Code summaries
- Column information for datasets
- Collection summary for the study
- Storage structure of data on R drive
Analysis scripts for RDM, AX, and Qualtrics data