Displaying 1 result from an estimated 1 matches for "plotw".
Did you mean:
plot
2008 Mar 09
1
Calling plot with a formula, from within a function, using ..., and xlim
..., and hoping someone can
shed some light into it. In a nutshell, there 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 incor...