knitr::opts_chunk$set( collapse = TRUE, comment = "#>" )
Please see manuscript for a long description of the following data. We will load the example data, and you can use the ?
with the dataset name to learn more about the data.
library(lrd) data("cued_recall_manuscript") head(cued_recall_manuscript) #?cued_recall_manuscript
Scoring in lrd
is case sensitive, so we will use tolower()
to lower case all correct answers and participant answers.
cued_recall_manuscript$Target <- tolower(cued_recall_manuscript$Target) cued_recall_manuscript$Answer <- tolower(cued_recall_manuscript$Answer)
You should define the following:
Note that the answer key can be in a separate dataframe, use something like answer_key$answer
for the key argument and answer_key$id_num
for the trial number. Fill in answer_key
with your dataframe name and the column name for those columns after the $
.
cued_output <- prop_correct_cued(data = cued_recall_manuscript, responses = "Answer", key = "Target", key.trial = "Trial_num", id = "Sub.ID", id.trial = "Trial_num", cutoff = 1, flag = TRUE, group.by = NULL) str(cued_output)
We can use DF_Scored
to see the original dataframe with our new scored column - also to check if our answer key and participant answers matched up correctly! The DF_Participant
can be used to view a participant level summary of the data. Last, if a grouping variable is used, we can use DF_Group
to see that output.
#Overall cued_output$DF_Scored #Participant cued_output$DF_Participant
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.