Skip to contents

Acts a container for a specified set of BiodiversityDataset contained within. Functions are provided to summarize across the BiodiversityDataset-class objects.

Note

This can likely be beautified further.

Public fields

data

A list of BiodiversityDataset objects.

name

The default name of this collection as character.

Methods


Method new()

Initializes the object and creates an empty list

Returns

NULL


Method print()

Print the names and properties of all Biodiversity datasets contained within

Usage

BiodiversityDatasetCollection$print(format = TRUE)

Arguments

format

A logical flag on whether a message should be printed.

Returns

A message on screen


Method show()

Aliases that calls print.

Usage

BiodiversityDatasetCollection$show()

Returns

A message on screen


Method get_types()

Types of all biodiversity datasets included in this

Usage

BiodiversityDatasetCollection$get_types(short = FALSE)

Arguments

short

A logical flag whether types should be in short format.

Returns

A character vector.


Method get_names()

Get names and format them if necessary

Usage

BiodiversityDatasetCollection$get_names(format = FALSE)

Arguments

format

A logical flag whether names are to be formatted

Returns

A character vector.


Method set_data()

Add a new Biodiversity dataset to this collection.

Usage

BiodiversityDatasetCollection$set_data(x, value)

Arguments

x

A character with the name or id of this dataset.

value

A BiodiversityDataset

Returns

Invisible


Method get_data_object()

Get a specific Biodiversity dataset by id

Usage

BiodiversityDatasetCollection$get_data_object(id)

Arguments

id

A character with a given id for the dataset.

Returns

Returns a BiodiversityDataset.


Method get_data()

Get all biodiversity observations from a given dataset.

Usage

BiodiversityDatasetCollection$get_data(id)

Arguments

id

A character with a given id for the dataset.

Returns

Returns all data from a set BiodiversityDataset.


Method get_coordinates()

Get coordinates for a given biodiversity dataset. Else return a wkt object

Usage

BiodiversityDatasetCollection$get_coordinates(id)

Arguments

id

A character with a given id for the dataset.

Returns

All coordinates from a given object in data.frame.


Method mask()

Convenience function to mask all input datasets.

Usage

BiodiversityDatasetCollection$mask(mask, inverse = FALSE)

Arguments

mask

A SpatRaster or sf object.

inverse

A logical flag if the inverse should be masked instead.

Returns

Invisible


Method rm_data()

Remove a specific biodiversity dataset by id

Usage

BiodiversityDatasetCollection$rm_data(id)

Arguments

id

A character with a given id for the dataset.

Returns

Invisible


Method length()

Number of Biodiversity Datasets in connection

Usage

BiodiversityDatasetCollection$length()

Returns

A numeric with the number of datasets.


Method get_observations()

Get number of observations of all datasets

Usage

BiodiversityDatasetCollection$get_observations()

Returns

A numeric with the number of observations across datasets.


Method get_equations()

Get equations from all datasets

Usage

BiodiversityDatasetCollection$get_equations()

Returns

A list vector with all equations across datasets.


Method get_families()

Get families from datasets.

Usage

BiodiversityDatasetCollection$get_families()

Returns

A list vector with all families across datasets.


Get custom link functions

Usage

BiodiversityDatasetCollection$get_links()

Returns

A list vector with all link functions across datasets.


Method get_columns_occ()

Get fields with observation columns

Usage

BiodiversityDatasetCollection$get_columns_occ()

Returns

A list vector with the names of observation columns.


Method get_weights()

Get the weights across datasets.

Usage

BiodiversityDatasetCollection$get_weights()

Returns

A list vector with the weights if set per dataset.


Method get_ids()

Get ids of all assets in the collection.

Usage

BiodiversityDatasetCollection$get_ids()

Returns

A list vector with the ids of all datasets.


Method get_id_byType()

Search for a specific biodiversity dataset with type

Usage

BiodiversityDatasetCollection$get_id_byType(type)

Arguments

type

A character for a given data type.

Returns

A character with the id(s) of datasets with the given type.


Method get_id_byName()

Get id by name

Usage

BiodiversityDatasetCollection$get_id_byName(name)

Arguments

name

A character for a given name.

Returns

A character with the id(s) of datasets with the given name.


Method show_equations()

Show equations of all datasets

Usage

BiodiversityDatasetCollection$show_equations(msg = TRUE)

Arguments

msg

A logical on whether to use print a message instead.

Returns

Shows equations on screen or as character.


Method plot()

Plot the whole collection

Usage

BiodiversityDatasetCollection$plot()

Returns

Invisible


Method clone()

The objects of this class are cloneable with this method.

Usage

BiodiversityDatasetCollection$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.