On Feb 10, 2011, at 12:24 AM, Ramya wrote:
hi there,
I need to subtract each value in the dataframe from the mean of the
column
and divide by the
standard deviation of the column.
dim(a)
[1] 2201152
data2 <- sapply(seq(from = 2, by = 1, length = 50), function(e){
rbind((a[[e]] - me
hi there,
I need to subtract each value in the dataframe from the mean of the column
and divide by the
standard deviation of the column.
> dim(a)
[1] 2201152
data2 <- sapply(seq(from = 2, by = 1, length = 50), function(e){
rbind((a[[e]] - mean(a[,e]))/sd(a[,e]))
})
Does this look right
2 matches
Mail list logo