Predata is R package developed for a personal use to improve data pre-analysis. Predata offers a set of functions to get and merge csv files (e.g. raw data from an experiment) and compute some descriptive statistics including standard errors correct for within-subject design. These latter functions were adapted from the scripts presented on the Cookbook website.
The detailed description of the functions as well as examples are provided in the R documentation.
Type ?*function_name*
in your R console to access it.
This package is released under the Creative Common Attribution-NonCommercial-ShareAlike 4.0 International license.
Predata depends on the dplyr
package.
You can install dplyr by typing install.packages('dplyr')
in your R console.
To install a R package from Github, you first need to install the devtools package.
In R, type install.packages('devtools')
.
Then install predata with the following command : install_github('cogitos/predata')
.
And now enjoy the package!
This function is designed to grab all csv files in a given folder and merge their data into a unique data frame. The options allow to specify if some row should be skipped, how many rows and which columns should be read in addition of the column separator.
These functions compute descriptive statistic as the summary or the describe (psych package
) functions but they also report the standard error and the confident interval.
The main interest of these functions is to allow to correct the standard errors for the within-subject design.
Reportwithin rely on the reportSE function and correct for within-subject design.
These functions allow to compute the mean and the standard deviation of a vector (strMeanStd) or of data frame (by group ou not) and format the data as a string: mean (std).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.