# NOT RUN {
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)
# }
Run the code above in your browser using DataLab