knitr::opts_chunk$set(collapse = T, comment = "#>")

Examples

library("pollen")
data("pollen_count")
head(pollen_count)

Pollen season

df <- subset(pollen_count, site == "Oz")
pollen_season(value = df$birch, date = df$date, method = "95")
df2 <- subset(pollen_count, site == "Atlantis")
pollen_season(value = df2$alder, date = df2$date, method = "95")
library("purrr")
pollen_count %>%
  split(., .$site) %>%
  map_df(~pollen_season(value = .$hazel, date = .$date, method = "95"), .id = "site")

Comparision of pollen season methods

df <- subset(pollen_count, site == "Oz")

ps_methods <- c("90", "95", "98", "Mesa", "Jager", "Lejoly")
names(ps_methods) <- c("90", "95", "98", "Mesa", "Jager", "Lejoly")
df_seasons <- ps_methods %>% map_df(~pollen_season(method = ., value = df$birch, date = df$date), .id = "method")
head(df_seasons)

Replacement of outliers

df <- subset(pollen_count, site == "Shire")
new_df <- outliers_replacer(value = df$alder, date = df$date)
identical(df, new_df)
library("purrr")
new_pollen_count <- pollen_count %>%
  split(., .$site) %>%
  map_df(~outliers_replacer(value = .$hazel, date = .$date, threshold = 4))


Nowosad/pollen documentation built on March 22, 2018, 7:57 a.m.