Use read.zoo and aggregate.zoo from zoo and
months, hours and as.chron from chron.
Note that we must read in col 1 as character to ensure leading
zeros don't get dropped. There are two mph columns and it is
assumed you want both:
Lines <- "LST inch mphDeg DegF DegF%volts D
Does this do it for you:
> # quick and dirty -- remove the 'mm' from the data and then aggregate
> x$hours <- (x$LST %/% 100) * 100
> aggregate(x$mph, list(x$hours), mean)
Group.1x
1 50601 13.82500
2 506010100 17.55000
3 506010200 23.04167
4 506010300 22.0
>
>
You can also 'fi
Dear all-
I have a dataset (see a sample below - but the whole dataset is June
2005 - June 2008). The "LST" format is "YYMMDDHHmm" and I would like to
get the hourly average of the "mph" for the summer months (spanning all
years). I have been trying to use "aggregate" but am not having much
3 matches
Mail list logo