check.func | R Documentation |
This function checks whether the class of the function
provided by the user is function
, and whether the output
produced by the function is numeric
with the correct dimension.
If not, an error message is displayed.
check.func(f, A, data, name.var, name.A, mat.type)
f |
The function to be tested. |
A |
A matrix that contains the information about the dimension for the output of f. |
data |
A data frame. |
name.var |
The name of the variable. |
name.A |
The name of the matrix |
mat.type |
The type of the matrix to be checked. |
Returns the output of the function in the format of numeric
and the correct dimension.
If mat.type
is col
, then a column vector is
returned.
If mat.type
is matrix
, then a square matrix is
returned.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.