Re: [R] Fast function for centering and standardizing variables

2009-06-01 Thread Greg Snow
Monday, June 01, 2009 7:12 AM > To: r-help@r-project.org > Subject: [R] Fast function for centering and standardizing variables > > Hi, > > I wrote a function to center variables I use in regression and > standardize them by the standard deviation (below) within certain >

[R] Fast function for centering and standardizing variables

2009-06-01 Thread Krzysztof Sakrejda-Leavitt
Hi, I wrote a function to center variables I use in regression and standardize them by the standard deviation (below) within certain groupings (much like the aggregate function can apply a function to groups). This runs fast enough when I have about 50 groups and 50k records, but sometimes I end