[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) (199.131.134.30)


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

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 .....

 attach(xd)
	 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._