[R] Boxplot lattice vs standard graphics
David Winsemius
dwinsemius at comcast.net
Mon Sep 17 19:50:46 CEST 2012
On Sep 17, 2012, at 4:18 AM, maxbre wrote:
> here it is, I think (I hope) I'm getting a little closer with this, but
> still there is something to sort out...
>
> error using packet 1
> unused argument(s) (coef =1.5, do.out=TRUE)
>
> by reading the help for panel.bwplot at the argument "stats" it says: "the
> function must accept arguments coef and do.out even if they do not use them
> (a ... argument is good enough). "
> I'm not sure how to couple with this...
>
> any help for this ?
>
> thanks
>
>
> ## start code
>
>
> mystats <- function(x){
> out <- boxplot.stats(10^x)
> out$stats <- log10(out$stats)
> out$conf <- log10(out$conf) ## Omit if you don't want notches
> out$out <- log10(out$out)
> out$coef<-1.5 #??
> out$do.out<-"TRUE" #??
> out ## With the boxplot statistics converted to the log10 scale
> }
>
> bwplot(conc~site, data=test,
> scales=list(y=list(log=10)),
> panel= function(x,y){
> panel.bwplot(x,y,stats=mystats)
> }
> )
No example data, so no efforts at running code.
?panel.bwplot
# Notice the Usage at the top of the page. The "..." is there for a reason.
# And notice that neither 'do.out' nor 'coef' are passed in the "stats" list
# The message was talking about what arguments your 'mystats' would accept, .... not what it would return. It's another instance of your needing to understand what the "..." formalism is doing.
?boxplot.stats
# I would be making a concerted effort to return a list with exactly the components listed there.
> ## end code
>
>
--
David Winsemius, MD
Alameda, CA, USA
More information about the R-help
mailing list