Methods for function cast
in package reshape. metrumrg converts reshape::cast
to the default method for an S4 generic; it also promotes its own S3 class keyed
to an S4 class, and defines a cast
method for it.
signature(data = "ANY")
For most purposes, a call to cast
will dispatch reshape::cast
, thus preserving existing behavior. See cast
.
signature(data = "keyed")
The method for keyed
mostly declares the same arguments as for cast
. The default for fill
, however, is changed to NA
. Three new arguments are added (before ...). check.names=FALSE
and stringsAsFactors=FALSE
are passed to data.frame
while reformatting the object returned by cast
. The new argument reclass=TRUE
is used to post-process the result: if TRUE
, an attempt will be made to restore output columns to the class that the value
column had before cast called as.vector
on it. The attempt aborts unless there exists a suitable 'as' function for that class. This method returns a keyed data.frame whose key is identical to id.vars
. See also melt.keyed
and examples there.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.