RL_subset_acceptable: Subset to acceptable suitabilities and major importances of...

Description Usage Arguments Details Value Author(s)

View source: R/RL_subset_acceptable.R

Description

Subset data to only retain desired suitabilities and major importances. Other suitabilities/major importances are recoded as NA. Rows containing only NA values can then be removed.

Usage

1
2
3
4
5
6
RL_subset_acceptable(
  x,
  acceptable_suitabilities = NA,
  acceptable_importances = NA,
  na.rm = TRUE
)

Arguments

x

A wide format dataframe with one column per habitat category. As output by RL_fetch().

acceptable_suitabilities

(optional) A vector of suitabilities deemed acceptable. Must be in the form c(3,2). See details. Defaults to accepting all.

acceptable_importances

(optional) A vector of major importances deemed acceptable. Must be in the form c(1,3). See details. Defaults to accepting all.

na.rm

(optional) Logical. If a row has all habitats recoded to NA, should it be removed? Default is TRUE.

Details

See suitability and major_importance for code values corresponding to each suitability/major importance name.

Value

A dataframe in wide format (one column per habitat type).

Author(s)

Matt Lewis, matthewlewis896@gmail.com


matthewlewis896/redlistManipulatr documentation built on Jan. 22, 2022, 1:01 p.m.