MTScoreAnswers: Function to score known answers

Description Usage Arguments Value Examples

View source: R/MTScoreAnswers.R

Description

Function to score known answers

Usage

1
2
MTScoreAnswers(results = NULL, answers = NULL, qPoints = 1,
  questionNames = NULL, scoreNAsAs = "wrong", NAValue = NULL)

Arguments

results

Needs column named 'RequesterAnnotation'

answers

Needs column named 'annotation'

qPoints

The points assigned to each question. Either a single value or a vector of length questionNames, where each element matches the points assigned to each element of questionNames.

questionNames

Columns names of questions to be compared between results and answers. If the columns names differ between the results and answers, questionNames can take a data.frame with colnames of 'results' and 'answers'. The rows in this data frame will be used to map the columns of results to the columns in answers.

scoreNAsAs

How to score NAs; possible values:

  • "wrong" - NAs are interpreted as wrong answers

  • "right" - NAs are interpreted as right answers

  • "value" - NAs are overwritten with the value of NAValue

NAValue

The value to replace NAs with.

Value

Returns the full inputted results object appended with scores.

Examples

1
2
#questionNames <- intersect(colnames(answers),colnames(results))
#qPoints <- c(5,5,1,5,1,5,5,5)

andrewbrownphd/MetaTurkR documentation built on Nov. 23, 2019, 4:17 p.m.