| ensureType | R Documentation |
If the x has not the given type it, the function prints information about the problem and stops with an error.
ensureType(x, type)
x |
the objects that shall be checked. |
type |
a string representing the type to be checked with 'is(x,type)' |
x
ensureType(3,"numeric")
ensureType(diag(2),"matrix")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.