[R] How to make array of regression objects

From: Dmitrij Kudriavcev <dimitrij.kudriavcev_at_ntsg.lt>
Date: Wed, 18 May 2011 13:53:32 +1000

Dear all,

I have made couple logistic regressions, what making a distribution of some event.

Currently, i store it like this:

o1 <- lrm(...)
o2 <- lrm(...)
o3 <- lrm(...)


Then, i have made a function to peak required regression object from this variables by it number:

get_object <- function(obj_name, nModel) {

    eval (parse(text=paste("o <- ", obj_name, nModel, sep="")))     o

Is there a better way to do it? I have try to store it in the matrix using data.frame(), but object become destroyed after that and predict() function do not recognize it.

Dmitrij Kudriavcev

        [[alternative HTML version deleted]]

R-help_at_r-project.org mailing list

https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Wed 18 May 2011 - 06:49:42 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 18 May 2011 - 12:30:07 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive