There is the bct function in the TeachingDemos package that does Box-Cox transforms (though you could also write your own fairly simply). The lappy/sapply functions will apply a function to each column of a data frame.
-- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Stuart > Sent: Tuesday, May 03, 2011 9:37 AM > To: r-help@r-project.org > Subject: [R] data transformation ----Box-Cox Transformations > > Hi > > Could any one please help how I can trnasform data based on Box-Cox > Transformations. I have massive data set with many variables. If > possible someone can write few lines so I can read in all data set > once and transform it. > > > g1 g2 g2 > 97.03703704 89.25925926 4.444444444 > 24.90740741 69.25925926 35.55555556 > 62.22222222 85.18518519 36.85185185 > 18.51851852 84.25925926 21.66666667 > 93.7037037 95.92592593 54.07407407 > 26.66666667 23.33333333 99.25925926 > 63.33333333 97.03703704 27.40740741 > 95.74074074 3.611111111 59.25925926 > 46.66666667 49.44444444 39.16666667 > 21.85185185 2.592592593 63.14814815 > 94.72222222 17.77777778 81.11111111 > > > any help will be much appreciated > > Cheers > Sbroad > > ______________________________________________ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting- > guide.html > and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.