code_fill_nopar: Fill Out Level 1 or 2 Habitat Codes

Description Usage Arguments Details Value Author(s)

View source: R/code_fill_nopar.R

Description

Optionally fill out Level 2 habitat codes if Level 1 codes exist and vice versa.

Usage

1
code_fill_nopar(x, level1.recode, level2.recode, subset, verbose)

Arguments

x

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

level1.recode

(optional) Logical. If Level 2 habitat info exists, should the corresponding Level 1 habitat be given the same info? See Details. Default is TRUE.

level2.recode

(optional) Logical. If Level 1 habitat info exists, should the corresponding Level 2 habitats be given the same info? See Details. Default is TRUE.

subset

(optional). Numeric. Specify proportion of x to run for between 0 and 1. Defaults to 1.

verbose

(optional) Numeric. If 0 gives no progress update, if 1 prints progress bar, if 2 prints 1 row per task completed. Default is 1.

Details

The level1.recode parameter will fill upstream Level 1 habitat categories if any Level 2 categories have habitat information. e.g. if habitat category 2.1 (Dry Savanna) is suitable and of major importance (coded as 31), habitat category 2 (Savanna) will be filled with this info too.

Similarly, level2.recode will fill all downstream Level 2 habitat categories if the corresponding Level 1 category is filled. e.g. if if habitat category 2 (Savanna) is suitable and of major importance (coded as 31), habitat categories 2.1 (Dry Savanna) and 2.2 (Moist Savanna) will be given the same information.

Value

A dataframe in wide format (one column per habitat type and one row per species' season).

Author(s)

Matt Lewis, matthewlewis896@gmail.com


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