Install devtools
R-package.
Open RStudio, and run the following command in the console:
{r}
install.packages("devtools")
aceR
using devtools
{r}
devtools::install_github("josegallegos07/aceR")
The following section describes how to set up a simple script for loading and processing raw ACE data.
aceR
library(aceR)
Working directory refers to the directory you want R to load data from (or write data to).
If we wanted to process RedBull data:
setwd("~/Google Drive/ACE/All Raw ACE Data/ACE Studies_Raw Data/Redbull")
We can also set up our script to process "all" ACE data in one go:
setwd("~/Google Drive/ACE/All Raw ACE Data/ACE Studies_Raw Data")
getwd()
tells your current working directory.dat = load_ace_bulk()
acerR
will throw warnings in cases where you are trying to load invalid data (data formatted in a way aceR
doesn't know how to handle). Please sanity check un-loadable files before reporting bugs.proc = proc_by_module(dat, verbose = TRUE)
To avoid running into issues, save our processed data into a different directory:
setwd("~/Desktop/processed")
export_csv(proc)
# load aceR
library(aceR)
# set working directory
setwd("~/Google Drive/ACE/All Raw ACE Data/ACE Studies_Raw Data/Redbull")
# load raw data
dat = load_ace_bulk()
# process data by module
proc = proc_by_module(dat, verbose = TRUE)
# export data
setwd("~/Desktop/processed")
export_csv(proc)
See example scripts
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.