readSpatRasterList: Read qs file containing list with SpatRaster objects (...

View source: R/readSpatRasterList.R

readSpatRasterListR Documentation

Read qs file containing list with SpatRaster objects ( package terra)

Description

Read qs file containing list with SpatRaster objects ( package terra)

Usage

readSpatRasterList(filePath = "filepath to save list file to ending in qs")

Arguments

filePath

file path to read the list object from ( as a package qs file with extension qs)

Details

Allows reloading of a list from and R session that contains SpatRasters the function recursively searches for PackedSpatRaster objects and coverts them to "SpatRaster" using terra::rast(). A work around to allow saving of sessions of R containing SpatRasters that can be reloaded ( saving the SpatRaster itself results in a null pointer error) to save list containing SpatRasters from R use saveSpatRasterList

Value

list - if the input file contained saved PackedSpatRasters the list will contain the usable SpatRasters


nevilamos/FAMEFMR documentation built on April 17, 2025, 9:32 p.m.