On Jan 7, 2010, at 8:03 AM, varend...@gmail.com wrote:
Hello all,
Firstly, thanks a lot for all your efforts,
the cbind function was very useful.
I tried all you told me, but I couldn't make it work in the way I
wanted.
I mixed two problems I had, a common mistake.
Sorry if I didn't explai
you could try something like this:
VD1 <- c(12, 34, 45, 7, 67, 45)
VD2 <- c(23, 12, 45, 67, 89, 90)
VD3 <- c(14, 11, 10, 19, 20, 27)
VD4 <- c(16, 22, 23, 29, 27, 28)
n <- 4
do.call(rbind, lapply(paste("VD", 1:n, sep = ""), get))
I hope it helps.
Best,
Dimitris
varend...@gmail.com wrote:
He
Hello all,
Firstly, thanks a lot for all your efforts,
the cbind function was very useful.
I tried all you told me, but I couldn't make it work in the way I wanted.
I mixed two problems I had, a common mistake.
Sorry if I didn't explain myself good enough.
Here, I post a solution for my problem
Henrique Dallazuanna
Sent: Monday, January 04, 2010 11:00 AM
To: Victor Kyros
Cc: r-help@r-project.org
Subject: Re: [R] vectors into a matrix
Try this:
cbind(ID = as.numeric(gsub("VD", "", ls(patt = "VD\\d+"))) ,
t(sapply(ls(patt = "VD\\d+"), get)))
On
Try this:
cbind(ID = as.numeric(gsub("VD", "", ls(patt = "VD\\d+"))) ,
t(sapply(ls(patt = "VD\\d+"), get)))
On Mon, Jan 4, 2010 at 3:32 PM, Victor Kyros wrote:
> Dear all,
>
> I'm writing code to do automatically several
> calculations and gather the results in a matrix.
>
>
> I have the followi
On Jan 4, 2010, at 1:13 PM, David Winsemius wrote:
On Jan 4, 2010, at 12:32 PM, Victor Kyros wrote:
Dear all,
I'm writing code to do automatically several
calculations and gather the results in a matrix.
I have the following vectors and
I just want to make a matrix with them:
VD1
VD2
VD3
On Jan 4, 2010, at 12:32 PM, Victor Kyros wrote:
Dear all,
I'm writing code to do automatically several
calculations and gather the results in a matrix.
I have the following vectors and
I just want to make a matrix with them:
VD1
VD2
VD3
...
VD12
cbind( 1:12, matrix(c(VD1, ..., VD12), nr
Dear all,
I'm writing code to do automatically several
calculations and gather the results in a matrix.
I have the following vectors and
I just want to make a matrix with them:
VD1
VD2
VD3
...
VD12
*In this case, this series of vectors stops there, in 12,
but it could be a higher number or sma
8 matches
Mail list logo