load_mland: Load 'MultiLand' or 'MultiLandMetrics' object

View source: R/load_mland.R

load_mlandR Documentation

Load 'MultiLand' or 'MultiLandMetrics' object

Description

Imports a zip file into an object of class 'MultiLand' that was previously saved with save_mland(). Alternatively, loads to the environment an RDS object depicting a 'MultiLandMetrics' object.

Usage

load_mland(path, ...)

Arguments

path

A string depicting the path to a zip file, to load objects of class 'MultiLand', or to a RDS file to load objects of class 'MultiLandMetrics'.

...

Other parameters passed to readRDS() when trying to load an object of class 'MultiLandMetrics'.

Value

A 'MultiLand' or a 'MultiLandMetrics' object.

See Also

save_mland(), mland(), metrics()

Examples

# Loads mland object from a zip file, previously created with save_mland()
mland_obj <- system.file("extdata", "ernesdesign.zip", package = "multilandr")
ernesdesign <- load_mland(mland_obj)

# Loads a MultiLandMetrics object previously generated with metrics() and exported as a
# RDS object with save_mland() or saveRDS()

mlm_obj <- system.file("extdata", "ed_metrics.rds", package = "multilandr")
ed_metrics <- load_mland(mlm_obj)

phuais/multilandR documentation built on Feb. 11, 2024, 9:27 p.m.