trajData: creates the data which serves as input for the "trajPlot"...

View source: R/trajData.R

trajDataR Documentation

creates the data which serves as input for the "trajPlot" function.

Description

creates the data which serves as input for the "trajPlot" function.

Usage

trajData(
  x,
  nodata = 2,
  category = 1,
  spres = c(1000, 1000),
  datacrs = NULL,
  unified = "yes"
)

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 c(1000,1000).

datacrs

is the CRS of the input data.

unified

is a string, which can be "yes" or "no" only. If "yes," the change is a percentage of a region's unified area; else, the change is a percentage of the entire region under consideration.

Value

The output from trajData

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"
unified_resp <- "yes"
trajdt_output <- trajData(x = example_data,nodata = no_data,
category = cat_interest,spres = data_res,datacrs = data_prj,
unified = unified_resp)


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