Miscellaneous R helper functions
The package can be installed as a library for everyday use via devtools::install_github("cu-psych-r-users/cuPsychRTools")
. If you'd like to play around with the source code and modify/add functionality, please feel free to fork this repo and submit a pull request.
This package currently functions as a catch-all package for various data reading/tidying/manipulation helpers. As best as possible, all functions are built on tidyverse
code and should work with the pipe %>%
. Functions currently supported include:
read_delim_multi(files, ...)
: Quickly read in multiple delimited files that contain similar data into one long dataframe. For example, if you have behavioral experiment data from multiple subjects who have completed the same task, read all their data into R at once using these functions.read_csv_multi()
wraps readr::read_csv()
read_tsv_multi()
wraps readr::read_tsv()
read_delim_multi()
wraps readr::read_delim()
for your nonspecific delimited needssuper_spread()
: A wrapper around tidyr::spread()
that allows you to simultaneously spread multiple columns of values that correspond to the same key column.super_gather()
: A wrapper around tidyr::gather()
that allows you to simultaneously gather multiple groups of columns that will correspond to the same key column.tidy_row_sums()
& tidy_row_means()
work inside of mutate()
tidyselect_row_sums()
& tidyselect_row_means()
work on their own in %>%
-chains, and accept tidyselect
helpers to specify columnsCurrently maintained in the Columbia University psychology department, care of Monica Thieu. Please create pull requests/issues in this repo to communicate about code stuff, or email Monica for general questions or thoughts.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.