S3Assignments | R Documentation |
This function analyzes an R function's code and finds the assignment of class attributes to any object. These are S3 class definitions.
S3Assignments(code, walker = mkS3AssignWalker(...), ...)
code |
the R code to search for S3 class assignments |
walker |
the |
... |
additional arguments passed to |
If asNode
is FALSE
, a character vector
that can also include NA
values.
If asNode
is TRUE
, a list
containing the rstatic
node objects
from the abstract syntax tree (AST) corresponding
to the S3 class assignments.
Duncan Temple Lang
f2 =
function(x)
{
ans = c(low = min(x), high = max(x))
class(ans) = "Extent"
ans
}
S3Assignments(f2)
f4 =
function(x)
structure(c(low = min(x), high = max(x)), class = c("Extent", "1D"))
S3Assignments(f4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.