spdata_array: Convert Spatial* data into 3d array

View source: R/spdata_array.R

spdata_arrayR Documentation

Convert Spatial* data into 3d array

Description

Convert Spatial* data into 3d array

Usage

spdata_array(
  vals,
  range = NULL,
  cellsize = 0.1,
  nlon = NULL,
  nlat = NULL,
  flip = FALSE,
  to2d = FALSE
)

Arguments

vals

⁠[ngrid, ntime]⁠ If ndim <= 2, range and cellsize is necessary.

range

A numeric vector, ⁠[lon_min, lon_max, lat_min, lat_max]⁠

cellsize

double, cell size

nlon, nlat

If nlon and nlat provided, range and cellsize will be ignored

Examples

#

rpkgs/nctools documentation built on Sept. 24, 2023, 9:23 p.m.