Skip to contents

This class describes the PredictorDataset and is used to store covariates within.

Public fields

id

The id for this collection as character.

data

A predictor dataset usually as SpatRaster.

name

A name for this object.

timeperiod

A timeperiod field

Methods


Method new()

Initializes the object and creates an empty list

Usage

PredictorDataset$new(id, data, ...)

Arguments

id

The id for this collection as character.

data

A predictor dataset usually as SpatRaster.

...

Any other parameters found.

Returns

NULL


Method print()

Print the names and properties of all Biodiversity datasets contained within

Usage

PredictorDataset$print(format = TRUE)

Arguments

format

A logical flag on whether a message should be printed.

Returns

A message on screen


Method get_name()

Return name of this object

Usage

PredictorDataset$get_name()

Returns

Default character name.


Method get_id()

Get Id of this object

Usage

PredictorDataset$get_id()

Returns

Default character name.


Method get_names()

Get names of data

Usage

PredictorDataset$get_names()

Returns

character names of the data value.


Method get_predictor_names()

Alias for get_names

Usage

PredictorDataset$get_predictor_names()

Returns

character names of the data value.


Method get_data()

Get a specific dataset

Usage

PredictorDataset$get_data(df = FALSE, na.rm = TRUE, ...)

Arguments

df

logical on whether data is to be returned as data.frame.

na.rm

logical if NA is to be removed from data.frame.

...

Any other parameters passed on.

Returns

A SpatRaster or data.frame.


Method get_time()

Get time dimension of object.

Usage

PredictorDataset$get_time(...)

Arguments

...

Any other parameters passed on.

Returns

A vector with the time dimension of the dataset.


Method get_projection()

Get Projection

Usage

PredictorDataset$get_projection()

Returns

A vector with the geographical projection of the object.


Method get_resolution()

Get Resolution

Usage

PredictorDataset$get_resolution()

Returns

A numeric vector with the spatial resolution of the data.


Method crop_data()

Utility function to clip the predictor dataset by another dataset

Usage

PredictorDataset$crop_data(pol)

Arguments

pol

A sf object used for cropping the data

Returns

Invisibile TRUE


Method mask()

Utility function to mask the predictor dataset by another dataset

Usage

PredictorDataset$mask(mask, inverse = FALSE, ...)

Arguments

mask

A SpatRaster or sf object.

inverse

A logical flag if the inverse should be masked instead.

...

Any other parameters passed on to masking.

Returns

Invisible


Method set_data()

Add a new Predictor dataset to this collection

Usage

PredictorDataset$set_data(x, value)

Arguments

x

character of the new name to be stored.

value

A new SpatRaster object.

Returns

This object


Method rm_data()

Remove a specific Predictor by name

Usage

PredictorDataset$rm_data(x)

Arguments

x

character of the predictor name to be removed.

Returns

Invisible


Method show()

Alias for print method

Usage

PredictorDataset$show()

Returns

Invisible


Method summary()

Collect info statistics with optional decimals

Usage

PredictorDataset$summary(digits = 2)

Arguments

digits

numeric Giving the rounding precision

Returns

A data.frame summarizing the data.


Method has_derivates()

Indication if there are any predictors that are derivates of outers

Usage

PredictorDataset$has_derivates()

Returns

A logical flag.


Method length()

Number of Predictors in object

Usage

PredictorDataset$length()

Returns

A numeric estimate


Method plot()

Basic Plotting function

Usage

PredictorDataset$plot()

Returns

A graphical interpretation of the predictors in this object.


Method clone()

The objects of this class are cloneable with this method.

Usage

PredictorDataset$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.