Nothing
## Checking class metric
check.metric <- function(metric) {
## Testing the metric
try(some_name.that.probAbly.doesnt.ExIsT <- metric(matrix(rnorm(25), 5, 5)), silent = TRUE)
## If function worked
if(exists("some_name.that.probAbly.doesnt.ExIsT")) {
## Is it a summary metric (one value)?
if(length(some_name.that.probAbly.doesnt.ExIsT) == 1) {
return("summary.metric")
} else {
return("class.metric")
}
} else {
stop("Invalid metric.")
}
}
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.