Re: [R] loop command to matrix

2012-11-27 Thread arun
__ From: eliza botto To: "smartpink...@yahoo.com" Sent: Tuesday, November 27, 2012 1:53 PM Subject: RE: [R] loop command to matrix thanks arun. i m more interested in learning commands.  thankyou so much eliza > Date: Tue, 27 Nov 2012 10:45:37 -0800 > From: smartpink...@ya

Re: [R] loop command to matrix

2012-11-27 Thread arun
137.0  -97.28571 A.K. - Original Message - From: eliza botto To: "r-help@r-project.org" Cc: Sent: Tuesday, November 27, 2012 12:51 PM Subject: [R] loop command to matrix Dear UseRs,Extremely sorry for a basic question. I have a matrix of 19 rows and 365 columns. what

Re: [R] loop command to matrix

2012-11-27 Thread eliza botto
thanks rui!! how can it be that you advise something and it doesn't work :) eliza > Date: Tue, 27 Nov 2012 18:14:41 + > From: ruipbarra...@sapo.pt > To: eliza_bo...@hotmail.com > CC: r-help@r-project.org > Subject: Re: [R] loop command to matrix > > Hello, >

Re: [R] loop command to matrix

2012-11-27 Thread Rui Barradas
Hello, Try x <- matrix(1:18, ncol = 6) sapply(seq_len(ncol(x)), function(i) x[, i] - rowMeans(x[, -i])) Hope this helps, Rui Barradas Em 27-11-2012 17:51, eliza botto escreveu: Dear UseRs,Extremely sorry for a basic question. I have a matrix of 19 rows and 365 columns. what i want to do is

[R] loop command to matrix

2012-11-27 Thread eliza botto
Dear UseRs,Extremely sorry for a basic question. I have a matrix of 19 rows and 365 columns. what i want to do is the following...First i want to leave out column number 1 and want to calculate the row wise mean of the remaining columns, which will obviously give me 365 values in one column, an