sentiment <- matrix(c(5.5, 2.9, 0.9, -1),
dimnames=list(c("A", "B", "C", "D"), c("Sentiment")))
# continuous numeric response variable
response <- c(5, 3, 1, -1)
compareToResponse(sentiment, response)
# binary response variable
response <- c(TRUE, TRUE, FALSE, FALSE)
compareToResponse(sentiment, response)
Run the code above in your browser using DataLab