View source: R/nbc4va_validation.R
| internalCheckNBCSummary | R Documentation | 
Performs checks to ensure that the arguments passed to summary.nbc are correct.
This function will perform automatic data type conversions, and display warnings when appropriate.
internalCheckNBCSummary(object, top = 5, id = NULL, csmfa.obs = NULL, ...)
| object | The result  | 
| top | A number that produces top causes depending on id: 
 | 
| id | A character representing a case id in the test data. | 
| csmfa.obs | A character vector of the true causes for calculating the CSMF accuracy. | 
| ... | Additional arguments to be passed if applicable | 
The following checks are applied:
object is of class "nbc"
top is a numeric value of length 1
id is NULL or a character of length 1, and exists in the test data
csmfa.obs is NULL or a character or vector of characters
out A list object containing the checked inputs:
 $object: an nbc object
$top: numeric value
$id: NULL or character value
$csmfa.obs: NULL or character vector
Other validation functions: 
internalCheckNBC()
library(nbc4va) data(nbc4vaData) # Create an nbc train <- nbc4vaData[1:50, ] test <- nbc4vaData[51:100, ] results <- nbc(train, test) # Check the inputs before passing on to summary checked <- nbc4va::internalCheckNBCSummary(results, 5, "g85") results <- checked$object top <- checked$top id <- checked$id csmfa.obs <- checked$csmfa.obs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.