Learn R Programming

lpjmlkit (version 1.0.11)

as_list: Coerce LPJmLMetaData to a list

Description

Function to coerce (convert) an LPJmLMetaData object into a list.

Usage

as_list(x)

Value

A list

Arguments

x

An LPJmLMetaData object

Examples

Run this code
if (FALSE) {

vegc_meta <- read_meta(filename = "./vegc.bin.json")

# Returns one dimensional array with timeseries for cells `27410:27415`
as_list(vegc_meta)
# $sim_name
# [1] "lu_cf"
#
# $source
# [1] "LPJmL C Version 5.3.001"
#
# $variable
# [1] "vegc"
#
# $descr
# [1] "vegetation carbon"
#
# $unit
# [1] "gC/m2"
#
# $nbands
# [1] 1
#
# ...

}

Run the code above in your browser using DataLab