The function fills in the existing column to hold outlier flags, and either overwrites the original file or outputs a data structure.
detect_outliers(
data,
iterations = 20,
sigma = 2,
grvi = FALSE,
snowflag = FALSE,
plot = FALSE,
internal = TRUE,
out_dir = tempdir()
)
PhenoCam data structure or filename
number of itterations in order to detect outliers ()
number of deviations to exclude outliers at
reverse the direction of the screening intervals to accomodate for GRVI outliers
use manual snow flag labels as outliers
visualize the process, mostly for debugging
(TRUE
/ FALSE
= default)
return a data structure if given a file on disk
(TRUE
/ FALSE
= default)
to accomodate for GRVI outliers
output directory where to store data
if (FALSE) {
# download demo data (do not detect outliers)
download_phenocam(site = "harvard$",
veg_type = "DB",
roi_id = "1000",
frequency = "3",
outlier_detection = FALSE)
# detect outliers in the downloaded file
detect_outliers(file.path(tempdir(),"harvard_DB_1000_3day.csv"))
}