Re: [R] File normalization

2010-05-25 Thread Joris Meys
cally written for this. See also ?sweep >>> >>> Bert Gunter >>> Genentech Nonclinical Biostatistics >>> >>> >>> >>> -----Original Message- >>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] >>&

Re: [R] File normalization

2010-05-25 Thread Phil Spector
om: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Joris Meys Sent: Tuesday, May 25, 2010 9:54 AM To: cobbler_squad Cc: r-help@r-project.org Subject: Re: [R] File normalization My code substracts the median absolute value. If you want to divide by it, the code must

Re: [R] File normalization

2010-05-25 Thread Joris Meys
Of Joris Meys > Sent: Tuesday, May 25, 2010 9:54 AM > To: cobbler_squad > Cc: r-help@r-project.org > Subject: Re: [R] File normalization > > My code substracts the median absolute value. If you want to divide by it, > the code must be : > apply(some_dataset,2,functi

Re: [R] File normalization

2010-05-25 Thread Bert Gunter
-help@r-project.org Subject: Re: [R] File normalization My code substracts the median absolute value. If you want to divide by it, the code must be : apply(some_dataset,2,function( > > x){ >x/median(abs(x)) > }) Thanks to Peter Langfelder for pointing out my mistake. On Tue, May 2

Re: [R] File normalization

2010-05-25 Thread Joris Meys
My code substracts the median absolute value. If you want to divide by it, the code must be : apply(some_dataset,2,function( > > x){ >x/median(abs(x)) > }) Thanks to Peter Langfelder for pointing out my mistake. On Tue, May 25, 2010 at 6:24 PM, Joris Meys wrote: > What kind of normalizatio

Re: [R] File normalization

2010-05-25 Thread Joris Meys
What kind of normalization do you want to do? If you want to divide all columns by the median absolute value, try : apply(some_dataset,2,function(x){ x-median(abs(x)) }) also look at ?scale for normalization using the average and the sd. Cheers Joris On Tue, May 25, 2010 at 6:01 PM, cobbler_s

[R] File normalization

2010-05-25 Thread cobbler_squad
Dear all, I have a file with 57 columns (671 time points in each column) File looks like this: 10.279191 -1.203200e-02 -0.166772 6.12080e-02 0.196379 4.591900e-02 0.293689 20.267017 -1.150700e-02 -0.159463 5.85400e-02 0.187775 4.392200e-02 0.280854 30.053778 -2.