Learn R Programming

tidysdm (version 1.0.0)

check_sdm_presence: Check that the column with presences is correctly formatted

Description

In tidysdm, the string defining presences should be the first level of the response factor. This function checks that the column is correctly formatted.

Usage

check_sdm_presence(.data, .col, presence_level = "presence")

Value

TRUE if correctly formatted

Arguments

.data

a data.frame or tibble, or a derived object such as an sf data.frame, or a factor (e.g. the column with the response variable)

.col

the column containing the presences

presence_level

the string used to define the presence level of .col