Summarize an object with optional extra computations
summary_mcs.RdApplies a summary function to an object and optionally attaches additional computations as an attribute.
Arguments
- x
An object to be summarized.
- summary
A function used to summarize
x. IfNULL,xis returned unchanged.- summary.args
A list of additional arguments passed to
summaryviado.call().- extra
An optional list of functions. Each function is applied to the original
x, and the results are stored as the"mcs"attribute of the output.
Value
If summary is provided, returns the result of
summary(x, ...); otherwise returns x.
If extra is supplied, the returned object has an additional
attribute "mcs" containing a list of extra results.