Description Usage Arguments Value Functions Examples
The generic function for transforming an R object into the appropriate subclass of FeatureSet. This includes most introspection-based metadata extraction from the object. Metadata extraction can be customized at the package/R sesion level for specific classes of objects by defining methods for this generic.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | makeFeatureSet(object, ...)
## S4 method for signature 'ggplot'
makeFeatureSet(object, ...)
## S4 method for signature 'trellis'
makeFeatureSet(object, ...)
## S4 method for signature 'gTree'
makeFeatureSet(object, ...)
## S4 method for signature 'recordedplot'
makeFeatureSet(object, ...)
## S4 method for signature 'expression'
makeFeatureSet(object, ...)
## S4 method for signature 'call'
makeFeatureSet(object, ...)
## S4 method for signature 'FeatureSet'
makeFeatureSet(object, ...)
## S4 method for signature 'ANY'
makeFeatureSet(object, ...)
## S4 method for signature 'data.frame'
makeFeatureSet(object, ...)
|
object |
The plot to summarize via metadata in an ObjFeatureSet (or subclass) |
... |
Other named arguments that become slots in the new PlotFeatureSet. |
PlotFeatureSet S4 object containing a ObjFeatureSet object and extracted plot features
makeFeatureSet,ggplot-method
: Construct a ObjFeatureSet from an object of class ggplot.
makeFeatureSet,trellis-method
: Construct a ObjFeatureSet from an object of class trellis.
makeFeatureSet,gTree-method
: Construct a ObjFeatureSet from an object of class gTree.
makeFeatureSet,recordedplot-method
: Construct a ObjFeatureSet from an object of class recordedplot.
makeFeatureSet,expression-method
: Construct a ObjFeatureSet from an unevaluated expression.
makeFeatureSet,call-method
: Construct a ObjFeatureSet from a call.
makeFeatureSet,FeatureSet-method
: No-op if we already have a ObjFeatureSet
makeFeatureSet,ANY-method
: Catch-all for attempted construction of a ObjFeatureSet from an object not of class ggplot or trellis.
makeFeatureSet,data.frame-method
: Construct a DFFeatureSet from a data.frame
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | library(ggplot2)
mt = datasets::mtcars
pg <- ggplot(mt, aes(wt, mpg)) + geom_point()
pfs <- makeFeatureSet(pg)
library(lattice)
titan <- datasets::Titanic
pl <- barchart(Class ~ Freq | Sex + Age, data = as.data.frame(titan),
groups = Survived, stack = TRUE, layout = c(4, 1),
auto.key = list(title = "Survived", columns = 2))
pfs <- makeFeatureSet(pl)
dffs <- makeFeatureSet(as.data.frame(titan))
## Not run:
plot(1:10, 1:10)
pb <- recordPlot()
pfs <- makeFeatureSet(pb)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.