means and SD for columns in a dataframe with NA values

Viewed 23849

I'm trying to calculate the mean and standard deviation of several columns (except the first column) in a data.frame with NA values.

I've tried colMeans, sapply, etc., to create a loop that runs through the data.frame and then stores means and standard deviations in a separate table but keep getting a "FUN" error. any help would be great. Thanks

a

3 Answers
Related