dilp_outliers()
is called internally by dilp()
.
However, it can be used on its own to flag specimens that may have been
reported, measured, or prepared incorrectly. dilp_outliers()
returns a data frame
listing specimens that have unusually high or low values for the four key
parameters used in DiLP analyses. This includes whether a specimen is an outlier
in the entire dataset, or among other specimens in the same morphotype. If flagged, we suggest looking at the
raw measurements and prepped specimen and evaluating if the data is in error or is correct. If in error, the specimen will
need to be reprepared and/or remeasured, and the updated datasheet re-read back into R.
Arguments
- specimen_data
Processed specimen level leaf physiognomic data. The structure should match the structure of the output from
dilp_processing()
Value
A 4 by X data frame. Each row represents one of the DiLP parameters, and the specimens that are outliers for that parameter.
Examples
# Check for outliers in the provided McAbeeExample dataset. Each
# of these outliers has been manually re-examined and was found acceptable.
dilp_dataset <- dilp_processing(McAbeeExample)
dilp_outliers <- dilp_outliers(dilp_dataset)
#> Warning: Outliers found. Please evaluate $outliers for possible wrong measurements
dilp_outliers
#> site specimen_number morphotype outlier within
#> 1 McAbee H1 BU-712-1117 M8 tc_ip entire dataset
#> 2 McAbee H1 BU-712-1169A M8 tc_ip entire dataset
#> 3 McAbee H1 BU-712-1176A M8 tc_ip entire dataset
#> 4 McAbee H2 BU-712-2173A M18 leaf_area entire dataset
#> 5 McAbee H2 BU-712-2105A M47 leaf_area entire dataset
#> 6 McAbee H2 BU-712-2124 M94 leaf_area entire dataset
#> 7 McAbee H1 M-2015-1-1 M24 perimeter_ratio entire dataset
#> 8 McAbee H1 BU-712-1073A M28 perimeter_ratio entire dataset
#> 9 McAbee H1 BU-712-1165 M28 perimeter_ratio entire dataset
#> 10 McAbee H1 M-2015-1-62 M28 perimeter_ratio entire dataset
#> 11 McAbee H1 BU-712-1182A M5 tc_ip morphotype
#> 12 McAbee H1 M-2015-1-3 M5 tc_ip morphotype
#> 13 McAbee H1 BU-712-1182A M5 perimeter_ratio morphotype
#> 14 McAbee H1 M-2015-1-122 M5 perimeter_ratio morphotype
#> 15 McAbee H1 M-2015-1-3 M5 perimeter_ratio morphotype
#> 16 McAbee H1 M-2015-1-40 M5 perimeter_ratio morphotype
#> 17 McAbee H1 BU-712-1117 M8 tc_ip morphotype
#> 18 McAbee H1 BU-712-1169A M8 tc_ip morphotype
#> 19 McAbee H1 BU-712-1176A M8 tc_ip morphotype
#> 20 McAbee H1 M-2015-1-69 M8 perimeter_ratio morphotype
#> 21 McAbee H1 M-2015-1-7 M19 tc_ip morphotype
#> 22 McAbee H2 M-2015-2-15 M19 tc_ip morphotype
#> 23 McAbee H2 M-2015-2-84 M19 tc_ip morphotype
#> 24 McAbee H2 BU-712-2197 M19 perimeter_ratio morphotype
#> 25 McAbee H1 M-2015-1-1 M24 perimeter_ratio morphotype
#> 26 McAbee H1 M-2015-1-17 M28 perimeter_ratio morphotype
#> 27 McAbee H1 M-2015-1-62 M28 perimeter_ratio morphotype