Description Usage Arguments Details Value Author(s)
View source: R/RL_reformat_long.R
Reformat wide format data (they way RL_fetch() retrieves data) to long format.
1 | RL_reformat_long(x, na.rm = TRUE)
|
x |
A wide format dataframe with one column per habitat category. As output by RL_fetch() or RL_code_fill(). |
na.rm |
(optional). Logical. Remove NA rows to compress output. See Details. Defaults to TRUE. |
If na.rm
is TRUE
(the default) then rows lacking habitat information will be removed. On pivoting, all habitat columns are retained - even those with no information - meaning that the output has many NA rows where a species is not found at all in a habitat (e.g. polar bears in Hot Desert). This is normally undesirable, so these rows are removed by default. If you would like to keep these rows then set na.rm
to FALSE
.
A dataframe in long format (one row per habitat type).
Matt Lewis, matthewlewis896@gmail.com
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.