Skip to contents

BiodiversityDataset prototype description

Public fields

name

The default name of this dataset as character.

id

A character with the unique id for this dataset.

equation

A formula object containing the equation of how this dataset is modelled.

family

The family used for this dataset as character.

link

The link function used for this data as character.

type

A character with the type as character.

weight

A numeric containing custom weights per observation for this dataset.

field_occurrence

A character with the name of the column name containing observations.

data

Contains the observational data in sf format.

use_intercept

A logical flag on whether intercepts are included for this dataset.

pseudoabsence_settings

Optionally provided pseudoabsence settings.

Methods


Method new()

Initializes the object and creates an empty list

Usage

BiodiversityDataset$new(
  name,
  id,
  equation,
  family,
  link,
  type,
  weight,
  field_occurrence,
  data,
  use_intercept,
  pseudoabsence_settings
)

Arguments

name

The default name of this dataset as character.

id

A character with the unique id for this dataset.

equation

A formula object containing the equation of how this dataset is modelled.

family

The family used for this dataset as character.

link

The link function used for this data as character.

type

A character with the type as character.

weight

A numeric containing custom weights per observation for this dataset.

field_occurrence

A character with the name of the column name containing observations.

data

Contains the observational data in sf format.

use_intercept

A logical flag on whether intercepts are included for this dataset.

pseudoabsence_settings

Optionally provided pseudoabsence settings.

Returns

NULL


Method print()

Print the names and properties of all Biodiversity datasets contained within

Usage

BiodiversityDataset$print()

Returns

A message on screen


Method set_equation()

Set new equation and writes it into formula

Usage

BiodiversityDataset$set_equation(x)

Arguments

x

A new formula object.

Returns

Invisible


Method get_equation()

Get equation

Usage

BiodiversityDataset$get_equation()

Returns

A placeholder or formula object.


Method show_equation()

Function to print the equation

Usage

BiodiversityDataset$show_equation()

Returns

A message on screen.


Method get_id()

Get Id within the dataset

Usage

BiodiversityDataset$get_id()

Returns

A character with the id.


Method get_type()

Get type of the dataset.

Usage

BiodiversityDataset$get_type(short = FALSE)

Arguments

short

A logical flag if this should be formatted in shortform.

Returns

A character with the type


Method get_column_occ()

Get field with occurrence information

Usage

BiodiversityDataset$get_column_occ()

Returns

A character with the occurence field


Method get_family()

Get family

Usage

BiodiversityDataset$get_family()

Returns

A character with the family for the dataset


Get custom link function

Usage

BiodiversityDataset$get_link()

Returns

A character with the family for the dataset


Method get_data()

Get data from the object

Usage

BiodiversityDataset$get_data()

Returns

A sf object with the data


Method get_weight()

Get weight

Usage

BiodiversityDataset$get_weight()

Returns

A numeric with the weights within the dataset.


Method show()

Print input messages

Usage

BiodiversityDataset$show()

Returns

A message on screen.


Method get_observations()

Collect info statistics about number of observations

Usage

BiodiversityDataset$get_observations()

Returns

A numeric with the number of observations.


Method mask()

Convenience function to mask all input datasets.

Usage

BiodiversityDataset$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 mask

Returns

Invisible


Method clone()

The objects of this class are cloneable with this method.

Usage

BiodiversityDataset$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.