search for: tempmean

Displaying 2 results from an estimated 2 matches for "tempmean".

Did you mean: temp_mean
2006 Aug 17
2
getting sapply to skip columns with non-numeric data?
...lumns with non-numeric data? I have a dataframe ?x? of w columns. Some columns are numeric, some are not. I wish to create a function to calculate the mean and standard deviation of each numeric column, and then ?bind? the column mean and standard deviation to the bottom of the dataframe. e.g. tempmean <- apply(data.frame(x), 2, mean, na.rm = T) xnew <- rbind(x,tempmean) I am running into one small problem what is the best way to have sapply ?skip? the non-numeric data and return NA?s?
2011 Oct 20
1
stop R from rounding
...','Lat.N','Long.W','Press','Depth','Temp','Sal','Oxy') date <- subset(x,select=c(Dec.Year), (Depth<201) & (Depth>199)) datelist <- list(date$Dec.Year) temp <- subset(x,select=c(Temp), (Depth<201) & (Depth>199)) tempmean <- aggregate(temp,by=datelist,FUN=mean) tempframe <- data.frame(tempmean) #the first column of this dataframe is the one that I don't want R to round Thank you! -- View this message in context: http://r.789695.n4.nabble.com/stop-R-from-rounding-tp3920803p3920803.html Sent from the R hel...