dropPerfectScores | R Documentation |
This function drops variables/items and subjects that have all perfect scores (either all 0's or all 1's) in a data table.
dropPerfectScores(
dat,
scoreref. = "score",
itemref. = "Item",
idref. = "id",
tol. = 0.001
)
dat |
The input data table |
scoreref |
The column name of the score variable in |
itemref |
The column name of the item variable in |
idref |
The column name of the id variable in |
tol |
Tolerance level for checking perfect scores – .01 would drop subjects with less than 1% correct or incorrect |
The input data table (dat
) without variables/items and subjects with all perfect scores.
dat <- data.table(id=c(1,1,1,2,2,2,3,3,3), Item=c('I1','I2','I3','I1','I2','I3','I1','I2','I3'),
score=c(1,0,1,0,0,0,0,1,1))
print(dropPerfectScores(dat))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.