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
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
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
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
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
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
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
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
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
.
.
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
10 matches
Mail list logo