search for: plotw2

Displaying 1 result from an estimated 1 matches for "plotw2".

Did you mean: plot2
2008 Mar 09
1
Calling plot with a formula, from within a function, using ..., and xlim
...re seems to be some problem when one calls plot with a formula, from within another function, using ... to pass arguments, and one of those arguments being xlim (and only xlim shows this problem). Here is an example: > plotw <- function(obj,...) { + plot(k~j, data=obj,...) + } > plotw2 <- function(obj,...) { + plot(obj$j,obj$k, ...) + } > df <- data.frame(j=1:3,k=1:3) > plotw(df, las=1, xaxs="i") > plotw(df, xlim=c(0,4)) Error in eval(expr, envir, enclos) : ..1 used in an incorrect context, no ... to look in > plotw2(df, las=1, xaxs="i&qu...