Re: [R] Macro Variable in R

2012-11-14 Thread David Winsemius
On Nov 13, 2012, at 6:06 PM, SASandRlearn wrote: > I have over 300 variables in my table. I want to choose only a handful of > those variables to run through many procedures. Lm(), glm() etc..i have over > 10 procedures that i need to run those variables everytime. Those handful of > variables ca

Re: [R] Macro Variable in R

2012-11-14 Thread John Kane
Message- > From: sasandrle...@gmail.com > Sent: Tue, 13 Nov 2012 18:06:08 -0800 (PST) > To: r-help@r-project.org > Subject: [R] Macro Variable in R > > I have over 300 variables in my table. I want to choose only a handful of > those variables to run through many procedures. Lm

[R] Macro Variable in R

2012-11-13 Thread SASandRlearn
I have over 300 variables in my table. I want to choose only a handful of those variables to run through many procedures. Lm(), glm() etc..i have over 10 procedures that i need to run those variables everytime. Those handful of variables can change everytime if output is satisfactory or not. I ha

Re: [R] macro variable in R?

2010-04-23 Thread Peter Dalgaard
karena wrote: > I need to create 10 matrices. say matrix 1-10. > > matrix_1 is 1 by 1 > matrix_2 is 2 by 2 > matrix_3 is 3 by 3 >. >. >. > matrix_10 is 10 by 10 > > I am just wondering if there are some functions in R that are similar to the > macro variables in SAS. so I can create

Re: [R] macro variable in R?

2010-04-22 Thread karena
Thank you all for the great help... I appreciate! -- View this message in context: http://r.789695.n4.nabble.com/macro-variable-in-R-tp2020772p2023108.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list h

Re: [R] macro variable in R?

2010-04-22 Thread David Winsemius
On Apr 22, 2010, at 12:24 PM, Steve Lianoglou wrote: Hi, On Thu, Apr 22, 2010 at 12:08 PM, karena wrote: I need to create 10 matrices. say matrix 1-10. matrix_1 is 1 by 1 matrix_2 is 2 by 2 matrix_3 is 3 by 3 . . . matrix_10 is 10 by 10 I am just wondering if there are some function

Re: [R] macro variable in R?

2010-04-22 Thread Steve Lianoglou
Hi, On Thu, Apr 22, 2010 at 12:08 PM, karena wrote: > > I need to create 10 matrices. say matrix 1-10. > > matrix_1 is 1 by 1 > matrix_2 is 2 by 2 > matrix_3 is 3 by 3 >   . >   . >   . > matrix_10 is 10 by 10 > > I am just wondering if there are some functions in R that are similar to the > macr

Re: [R] macro variable in R?

2010-04-22 Thread Benilton Carvalho
maybe for (i in 1:10) assign(paste("matrix", i, sep="_"), matrix(nrow=i, ncol=i)) suffices? On Thu, Apr 22, 2010 at 5:08 PM, karena wrote: > > I need to create 10 matrices. say matrix 1-10. > > matrix_1 is 1 by 1 > matrix_2 is 2 by 2 > matrix_3 is 3 by 3 >   . >   . >   . > matrix_10 is 10 by 1

Re: [R] macro variable in R?

2010-04-22 Thread Mario Valle
Why don't use a list? m <- list() for(i in 1:10) { m[[i]] <- matrix(NA, i, i) } then access them as m[[7]][1,6] Ciao! mario On 22-Apr-10 18:08, karena wrote: I need to create 10 matrices. say matrix 1-10. matrix_1 is 1 by 1 matrix_2 is 2 by 2 matrix_3 is 3 by 3 . .

[R] macro variable in R?

2010-04-22 Thread karena
I need to create 10 matrices. say matrix 1-10. matrix_1 is 1 by 1 matrix_2 is 2 by 2 matrix_3 is 3 by 3 . . . matrix_10 is 10 by 10 I am just wondering if there are some functions in R that are similar to the macro variables in SAS. so I can create these 10 matrices by doing: for (i in