[R] Find mean of values in three-dimensional array

Nick Tulli nick.tulli.95 at gmail.com
Wed Jun 15 19:37:59 CEST 2016


Hey R-Help,

I've got a three dimensional array which I pulled from a netcdf file.
The data in array are the humidity values of locations in the United
States over a time period. The three dimensions are [longitude,
latitude, days], 141x81x92. My goal is to find the mean value at each
longitude/latitude over the 92 day period.

I could probably accomplish my goal by running a loop, but I'm sure
that there is a much easier and more efficient way to accomplish the
goal in R. Any suggestions?


Thanks guys.



More information about the R-help mailing list