Convert a SpatRaster object to a data.frame structure required by synoptReg
Source:R/as_synoptReg.R
as_synoptReg.Rd
Convert a SpatRaster from the terra package to a data.frame formatted in the way required by synoptReg .
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)