View source: R/Proxytools_helpers.R
spatial_means | R Documentation |
Calculate spatial mean of a climate data field
spatial_means(lon, lat, clim_field)
lon |
Vector of longitudes |
lat |
Vector of latitudes |
clim_field |
Climate data field (with dimension #lon x #lat) |
Number (spatial mean)
# Create dummy field
lon <- seq(0,90,by=10)
lat <- seq(0,70,by=10)
clim_field <- matrix(1:80,nrow=10)
# Compute spatial mean
clim_mean <- spatial_means(lon,lat,clim_field)
# Print spatial mean
print(clim_mean)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.