frame.attr(which, n=NULL) frame.attr(which, n=NULL) <- value frame.attributes()
frame.attr returns the value of the attribute
which of frame
n.
Frames can have attributes either from use of the assignment form of
frame.attr
in the same frame,
or because the frame was created with attributes; e.g., because the
definition of the function being called in the frame itself has attributes.
frame.attributes returns the list of all the attributes of the current frame.
myfun <- structure(
function(x) {
if(missing(x)) cat(frame.attr("hint"), "\\n")
something.else(x)
},
hint = "Consult your local statistician"
)