Skip to content
Prev 178988 / 398506 Next

gridding values in a data frame

It's hard to check without a reproducible example, but the following
code should give you a 3d array of lat x long x time:

library(reshape)

df$lat <- round_any(df$LATITUDE, 5)
df$long <- round_any(df$LONGITUDE, 5)
df$value <- df$TIME

cast(df, lat ~ long ~ time, mean)
On Thu, Apr 30, 2009 at 10:55 AM, dxc13 <dxc13 at health.state.ny.us> wrote: