changeData: Creates a list containing the raster data sets concerning the...

View source: R/changeData.R

changeDataR Documentation

Creates a list containing the raster data sets concerning the number of times the category of interest is present and the number of times the category of interest changes during the time series.

Description

Creates a list containing the raster data sets concerning the number of times the category of interest is present and the number of times the category of interest changes during the time series.

Usage

changeData(x, nodata, category, spres, datacrs = NULL)

Arguments

x

is the data, which must be a RasterStack,RasterBrick,SpatRaster or data frame.

nodata

is alphanumeric, which denotes no data in the data set.

category

is the category of interest. The default is set to 1.

spres

is a 1*2 vector indicating the spatial resolution of the data. The default is set to c(1000,1000).

datacrs

is the Coordinate Reference System (CRS) of the input data.

Value

The output from changeData

Examples

example_data <- terra::rast(system.file("external/Example_raster_Y.tif",package="binaryTimeSeries"))
no_data <- 2
cat_interest <- 1
data_res <- c(1000,1000)
data_prj <- "+proj=utm +zone=32 +datum=WGS84 +ellps=GRS80  +units=m +no_defs"
chdata_output <- changeData(x = example_data,nodata = no_data,
category = cat_interest,spres = data_res,datacrs = data_prj)


binaryTimeSeries documentation built on July 18, 2022, 5:07 p.m.