# NOT RUN {
lossType <- 'absolute'
checkValues(list(lossType), list(c('absolute', 'quadratic')))
# }
# NOT RUN {
checkValues(list(lossType), list(c('absolute', 'quadratic'), c('test', 'test2')))
# }
# NOT RUN {
#The next error message is weird, since it does not return the real name of the listObject
#that found to be wrong.
lossType <- 'absolute55'
listObjects <- list(lossType)
listValues <- list(c('absolute', 'quadratic'))
# }
# NOT RUN {
checkValues(listObjects, listValues)
#Now it is ok...
checkValues(list(lossType), list(c('absolute', 'quadratic')))
# }
Run the code above in your browser using DataLab