as_synoptReg: Convert a SpatRaster object to a data.frame structure...

View source: R/as_synoptReg.R

as_synoptRegR Documentation

Convert a SpatRaster object to a data.frame structure required by synoptReg

Description

Convert a SpatRaster from the terra package to a data.frame formatted in the way required by synoptReg .

Usage

as_synoptReg(x)

Arguments

x

SpatRaster time series containing the atmospheric data (e.g. mean sea level pressure).

Value

A data.frame with the following variables: x, y, time, value, var, units

See Also

read_nc

Examples

# Load data
slp_file <- system.file("extdata", "mslp_ei.nc", package = "synoptReg")

# Reading data
slp <- read_nc(slp_file)

# Converting it to the required structure by synoptReg
slp_df <- as_synoptReg(slp)


lemuscanovas/synoptReg documentation built on April 30, 2024, 7:32 a.m.