rmf_as_list: Convert objects to a rmf_list

View source: R/utils.R

rmf_as_listR Documentation

Convert objects to a rmf_list

Description

Convert objects to a rmf_list

Converts a rmf_2d_array or rmf_3d_array to a rmf_list

Usage

rmf_as_list(...)

## S3 method for class 'rmf_3d_array'
rmf_as_list(
  obj,
  dis,
  name = "value",
  mask = 1 + obj * 0,
  ijk = NULL,
  kper = attr(obj, "kper")
)

## S3 method for class 'rmf_2d_array'
rmf_as_list(obj, ...)

## S3 method for class 'rmf_4d_array'
rmf_as_list(obj, l, ...)

Arguments

obj

a rmf_2d_array or rmf_3d_array

dis

a RMODFLOW dis object; only used when ijk is suppplied

name

character; name of the resulting column which holds the extracted values from the array; defaults to "value"

mask

a logical array with the same dimensions as obj. Used to select cells from obj; defaults to all cells

ijk

optional; a data.frame with i, j and k columns used to select the cells. Overwrites the use of mask.

kper

sets the kper attribute of the returned list; defaults to the kper attribute of obj

l

integer index used to subset the 4th dimension of a rmf_4d_array.

Details

rmf_convert_id_to_ijk can be used to obtain a ijk data.frame from either MODFLOW cell id's or R cell id's.

will set k to 1

Value

a rmf_list

See Also

rmf_as_array


rogiersbart/RMODFLOW documentation built on Jan. 14, 2023, 4:21 a.m.