get_outliers | R Documentation |
Identifies temperature-precipitation pairs (points) that are outside of the Whittaker biome polygons.
get_outliers(tp, validate = TRUE)
tp |
A two column |
validate |
Should the input be validated?
Variable containing a single logical constant ( |
Usually, for getting temperature-precipitation values one would most probably
have pairs of spatial coordinates. These coordinates would be used for raster
extraction (see raster::extract()
).
The ranges used for input validation are slightly wider that those encountered in the (CHELSA v 1.2 BIO1 & BIO12 raster datasets. The following can throw an error (also possible reasons are given in the error messages):
Temperatures were switched with precipitations (temperature must be the first column);
Temperature values were extracted from a raster that stores values as integers (for saving space, raster datasets could store data as integer type instead of full floating point accuracy; usually division by 10 solves the issue);
Precipitations are in mm and not cm (divide by 10 to get cm);
The given values are simply not temperature nor precipitation values. Perhaps other raster datasets were accidently used for point extraction.
We consider useful and informative to include input validation.
There is always the option to turn the validation off by setting the argument validate = FALSE
.
Returns a data.table
with tree columns:
Column | Type | Description | |||
[, 1] | row_idx | , | integer | : | Outlier row index |
[, 2] | temp | , | numeric | : | Outlier mean annual temperature (Celsius degrees) |
[, 3] | pp_cm | , | numeric | : | Outlier annual precipitation (cm) |
The indices in row_idx
connect to the row indices in tp
table.
Valentin Stefan
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.