Description Usage Arguments Details Value Author(s) See Also
The function extract mathematical functions or variables from a string which is usually the body of a function. If one wishes to extract directly from a function, such function must first be converted into a string. Another function in this package body2string does this.
1 | object.extract(func, variable = TRUE, subset.q = TRUE, exception = NULL)
|
func |
A string. Although it is named as "func", this argument must be string-type. Function body2string converts an R function into a string. |
variable |
If TRUE, only mathematical variables in func will be extracted, otherwise mathematical functions will be extracted. |
subset.q |
If TRUE, the square bracket (usually used as subsetting) is recognised as part of the attached variable. E.g. x[a:b] will be recognised as one single variable while if FALSE, square brackets are ignored and three variables x,a,b are returned. |
exception |
String. Mathematical variables or functions not to be extracted. Can be a vector. |
NULL is returned if no variable or function in func.
A list of string of variables or functions in func.
Char Leung
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.