# NOT RUN {
data("merzbach", package = "folio")
## Coerce the merzbach dataset to a count matrix
## Keep only decoration types that have a maximum frequency of at least 50
keep <- apply(X = merzbach, MARGIN = 2, FUN = function(x) max(x) >= 50)
counts <- as_count(merzbach[, keep])
## Group by phase
## We use the row names as time coordinates (roman numerals)
dates <- as.numeric(utils::as.roman(rownames(counts)))
## Frequency Increment Test
freq <- test_fit(counts, dates)
## Plot time vs abundance and highlight selection
plot_time(freq)
plot_time(freq, roll = TRUE, window = 5)
# }
Run the code above in your browser using DataLab