get_shuffled_score | R Documentation |
The function shuffles the labels the independent variable (according to the value of 'iv'), and returns result of the function f on the shuffled dataset.
get_shuffled_score(data, idv, dv, iv, preprocessFs, preprocessArgs, params, f)
data |
the data of a specific participant, arranged according to the independent variable ('iv') |
idv |
The name of the participant identifier column. |
dv |
the names of the dependent variable(s) to apply the summary function (summary_function) to. For multiple dependent variables use a string list with the names of each dependent variable (e.g., c('dv1','dv2')), |
iv |
labels of an independent variable, indicating the different levels under which the dependent variable (dv) is expected to differ. |
preprocessFs |
An ordered list of functions to apply to the dataset before starting with the analysis. The default value of the argument (empty list), will result in shuffling the labels of the independent variable, iv. The function accepts a 'data' argument (a data frame including the data of an individual), and an 'args' argument which includes all additional arguments needed to run the preprcessing function. |
preprocessArgs |
An ordered list of function arguments, to be used when invoking the 'preprocessFs' (in order, meaning preprocessFs[i](preprocessArgs[i]) will be invoked for each i). For example, if the preprocessing function accepts arguments 'a','b' as inputs, preprocessArgs should be set to list(a,b) |
params |
configuration for the function to apply to the data of each participant ('f') |
f |
the function to apply to the data of each participant, returning the value of interest for the analysis. |
the function returns the score calculated by applying the function 'f' to the data after shuffling the labels of the indepdent variable 'iv'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.