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


BiodiversityDatasetCollection$new()

Initializes the object and creates an empty list

Returns

NULL


BiodiversityDatasetCollection$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


BiodiversityDatasetCollection$show()

Aliases that calls print.

Usage

BiodiversityDatasetCollection$show()

Returns

A message on screen


BiodiversityDatasetCollection$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.


BiodiversityDatasetCollection$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.


BiodiversityDatasetCollection$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


BiodiversityDatasetCollection$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.


BiodiversityDatasetCollection$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.


BiodiversityDatasetCollection$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.


BiodiversityDatasetCollection$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


BiodiversityDatasetCollection$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


BiodiversityDatasetCollection$length()

Number of Biodiversity Datasets in connection

Usage

BiodiversityDatasetCollection$length()

Returns

A numeric with the number of datasets.


BiodiversityDatasetCollection$get_observations()

Get number of observations of all datasets

Usage

BiodiversityDatasetCollection$get_observations()

Returns

A numeric with the number of observations across datasets.


BiodiversityDatasetCollection$get_equations()

Get equations from all datasets

Usage

BiodiversityDatasetCollection$get_equations()

Returns

A list vector with all equations across datasets.


BiodiversityDatasetCollection$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.


BiodiversityDatasetCollection$get_columns_occ()

Get fields with observation columns

Usage

BiodiversityDatasetCollection$get_columns_occ()

Returns

A list vector with the names of observation columns.


BiodiversityDatasetCollection$get_weights()

Get the weights across datasets.

Usage

BiodiversityDatasetCollection$get_weights()

Returns

A list vector with the weights if set per dataset.


BiodiversityDatasetCollection$get_ids()

Get ids of all assets in the collection.

Usage

BiodiversityDatasetCollection$get_ids()

Returns

A list vector with the ids of all datasets.


BiodiversityDatasetCollection$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.


BiodiversityDatasetCollection$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.


BiodiversityDatasetCollection$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.


BiodiversityDatasetCollection$plot()

Plot the whole collection

Usage

BiodiversityDatasetCollection$plot()

Returns

Invisible


BiodiversityDatasetCollection$clone()

The objects of this class are cloneable with this method.

Usage

BiodiversityDatasetCollection$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.