View source: R/extract_clean_data.R
| extract_clean_data | R Documentation |
Extract final clean data using either absolute or best method generated outliers.
extract_clean_data(
refdata,
outliers,
mode = "abs",
var_col = NULL,
threshold = NULL,
warn = FALSE,
verbose = FALSE,
autothreshold = FALSE,
pabs = 0.1,
loess = FALSE,
outlier_to_NA = FALSE,
cutoff = 0.6
)
refdata |
|
outliers |
|
mode |
|
var_col |
|
threshold |
|
warn |
|
verbose |
|
autothreshold |
|
pabs |
|
loess |
|
outlier_to_NA |
###param multiple TRUE for multiple species and FALSE for single species considered during outlier detection. |
cutoff |
|
Either a list or dataframe of cleaned records for multiple species.
search_threshold
data(jdsdata)
data(efidata)
matchdata <- match_datasets(datasets = list(jds = jdsdata, efi = efidata),
lats = 'lat',
lons = 'lon',
species = c('speciesname','scientificName'),
country= c('JDS4_site_ID'),
date=c('sampling_date', 'Date'))
danube <- system.file('extdata/danube.shp.zip', package='specleanr')
db <- sf::st_read(danube, quiet=TRUE)
worldclim <- terra::rast(system.file('extdata/worldclim.tiff', package='specleanr'))
rdata <- pred_extract(data = matchdata,
raster= worldclim ,
lat = 'decimalLatitude',
lon= 'decimalLongitude',
colsp = 'species',
bbox = db,
minpts = 10,
list=TRUE,
merge=FALSE)
out_df <- multidetect(data = rdata, multiple = TRUE,
var = 'bio6',
output = 'outlier',
exclude = c('x','y'),
methods = c('zscore', 'adjbox','iqr', 'semiqr','hampel'))
#extracting use the absolute method for one species
extractabs <- extract_clean_data(refdata = rdata, outliers = out_df,
mode = 'abs', threshold = 0.6,
autothreshold = FALSE)
bestmout_bm <- extract_clean_data(refdata = rdata, outliers = out_df,
mode = 'best', threshold = 0.6,
autothreshold = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.