[Rd] eval functions... (PR#668)

aprasad@fs.fed.us aprasad@fs.fed.us
Fri, 22 Sep 2000 22:31:08 +0200 (MET DST)

Full_Name: Anantha Prasad
Version: 1.1.1
OS: Linux
Submission from: (NULL) (

I am trying to convert some S-PLUS code to R (a tcl/tk application that uses
here is the error I got in R (but not in S-PLUS)...so I am wondering if it is a

Eg., the foll. extract from a function runs fine in S-PLUS but gives the error:
Error in x[[j]] : subscript out of bounds
in R

code snippet .....

	 resp <- "iv802"
	pickedlist <- "BD + CEC + CLAY + ERODFAC + INCEPTSL"
	lmexp <- paste(resp, " ~ ", pickedlist,sep="")
        tmpzx <- eval(lm(lmexp,data=xd))

Essentially, I want to do:
 lm(iv802 ~ BD + CEC + CLAY + ERODFAC + INCEPTSL, data=xd)
thru a function that has the parameters passed thru TclTk and Perl......

Thanks much.

r-devel 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-devel-request@stat.math.ethz.ch