### example of multiple subjects and default quantile values
# only select the congruent data from the example data set
data <- subset(exampleData, exampleData$congruency == "congruent")
# get the CDFs
getCAF <- caf(data)
#-- example of single subject and different quantile values
# only select subject 1 from the example data. Also, select only the
# "absent" condition and incongruent trials. This is an example when working
# with multiple conditions (besides target congruency).
data <- subset(exampleData, exampleData$subject == 1 &
exampleData$condition == "absent" &
exampleData$congruency == "incongruent")
# set new quantile values
newQuantiles <- c(.2, .4, .6, .8)
# get the CAFs
getCAF <- caf(data, quantiles = newQuantiles, multipleSubjects = FALSE)
Run the code above in your browser using DataLab