Almost except
tapply(x[4:8], x$interval, colMeans)
works but with a larger data frame I have problems, even
tapply(x[4:7], x$interval, colMeans)
gets the "arguments must have the same length" error. But they do! Any
ideas?
Thanks for your help Jim
On 12/19/2011 2:00 PM, jim holtman wrote:
Do
Hmm, almost but my real data frame is much larger (128 columns).
The problem is with this line
newData <- do.call(rbind, tapply(x[4:8], x$interval, colMeans))
when I do
tapply(x[4:8], x$interval, colMeans)
all works but when I do
tapply(x[4:7], x$interval, colMeans)
I get
Error in tapply(
Does this work for you:
> x <- read.table(text = " date time Voltage LwTempDownelling LwDownwelling
> LwDownwelling_min LwDownwelling_max LwTempUpwelling
+ 1 2011-11-01 00:00:00 2.73244717.30 30.0
14.0 39.5 17.83
+ 2 2011-11-01 00:10:00 2.731534
3 matches
Mail list logo