[R] override ask = TRUE in plot.formula

Corey Moffet cmoffet at nwrc.ars.usda.gov
Tue Aug 20 20:52:01 CEST 2002


I am having difficulty with plot.formula.

For example:

-------------------

dat <- data.frame(y  =            c(1,1,1,2,2,2,3,3,3,4,4,4), 
                  x1 = as.ordered(c(1,1,1,1,1,1,2,2,2,2,2,2)),
                  x2 = as.ordered(c(1,1,1,2,2,2,1,1,1,2,2,2)))

plot(y ~ x1 + x2, data = dat) # Works fine "interactively" asking:
# "Hit <Return> to see next plot:"
#  But this causes problems when it is run in a batch file.

plot(y ~ x1 + x2, data = dat, ask = FALSE) # gives error:
# "Error in model.frame(formula, rownames, variables, varnames, extras,
extranames,  : 
#        variable lengths differ"

-------------------

I want to be able to generate these figures in a non-interactive batch file.

Is this the expected behavior?  Is there a work around?

platform i386-pc-mingw32
arch     i386           
os       mingw32        
system   i386, mingw32  
status                  
major    1              
minor    5.1            
year     2002           
month    06             
day      17             
language R              

With best wishes and kind regards I am

Sincerely,

Corey A. Moffet
Support Scientist

University of Idaho
Northwest Watershed Research Center
800 Park Blvd, Plaza IV, Suite 105
Boise, ID 83712-7716
(208) 422-0718
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list