mland_load: Load 'MultiLand' or 'MultiLandMetrics' object

View source: R/mland_load.R

mland_loadR Documentation

Load 'MultiLand' or 'MultiLandMetrics' object

Description

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

Usage

mland_load(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

mland_save(), mland(), mland_metrics()

Examples

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

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

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

phuais/multilandR documentation built on May 14, 2024, 9:11 p.m.