lattice - object 'panel.bpplot' not found error in R -
i'm new r , i'm trying create lattice bwplot
, i'm getting error saying object 'panel.bpplot' not found
. have tried using following example r documentation:
set.seed(13) x <- rnorm(1000) g <- sample(1:6, 1000, replace=true) x[g==1][1:20] <- rnorm(20)+3 # contaminate 20 x's group 1 # default trellis box plot require(lattice) bwplot(g ~ x) bwplot(g ~ x, panel=panel.bpplot, probs=seq(.01,.49,by=.01), datadensity=true)
the result first plot created (bwplot(g ~ x)
), when second 1 tries run get:
error in bwplot.formula(g ~ x, panel = panel.bpplot, probs = seq(0.01, : object 'panel.bpplot' not found
any appreciated!
panel.bpplot
function of package hmisc
, need attach package before plotting.
library(hmisc) bwplot(g ~ x, panel=panel.bpplot, probs=seq(.01,.49,by=.01), datadensity=true)
Comments
Post a Comment