plot_aoristic | R Documentation |
Plot Aoristic Analysis
## S4 method for signature 'AoristicSum' autoplot(object, ..., facet = TRUE) ## S4 method for signature 'AoristicSum,missing' plot(x, facet = TRUE, ...) ## S4 method for signature 'RateOfChange' autoplot(object, ..., level = 0.95, facet = TRUE) ## S4 method for signature 'RateOfChange,missing' plot(x, level = 0.95, facet = TRUE, ...)
object, x |
An AoristicSum object. |
... |
Currently not used. |
facet |
A |
level |
A length-one |
autoplot()
returns a ggplot
object.
plot()
is called it for its side-effects: it results in a graphic being
displayed (invisibly returns x
).
N. Frerebeau
aoristic()
, roc()
Other plotting methods:
plot_event
,
plot_fit
,
plot_mcd
,
plot_time()
## Aoristic Analysis data("zuni", package = "folio") ## Set the start and end dates for each ceramic type dates <- list( LINO = c(600, 875), KIAT = c(850, 950), RED = c(900, 1050), GALL = c(1025, 1125), ESC = c(1050, 1150), PUBW = c(1050, 1150), RES = c(1000, 1200), TULA = c(1175, 1300), PINE = c(1275, 1350), PUBR = c(1000, 1200), WING = c(1100, 1200), WIPO = c(1125, 1225), SJ = c(1200, 1300), LSJ = c(1250, 1300), SPR = c(1250, 1300), PINER = c(1275, 1325), HESH = c(1275, 1450), KWAK = c(1275, 1450) ) ## Keep only assemblages that have a sample size of at least 10 keep <- apply(X = zuni, MARGIN = 1, FUN = function(x) sum(x) >= 10) ## Calculate date ranges for each assemblage span <- apply( X = zuni[keep, ], FUN = function(x, dates) { z <- range(unlist(dates[x > 0])) names(z) <- c("from", "to") z }, MARGIN = 1, dates = dates ) ## Coerce to data.frame span <- as.data.frame(t(span)) ## Calculate aoristic sum (normal) aorist_raw <- aoristic(span, step = 50, weight = FALSE) plot(aorist_raw) ## Calculate aoristic sum (weights) aorist_weighted <- aoristic(span, step = 50, weight = TRUE) plot(aorist_weighted) ## Calculate aoristic sum (weights) by group groups <- rep(c("A", "B", "C"), times = c(50, 90, 139)) aorist_groups <- aoristic(span, step = 50, weight = TRUE, groups = groups) plot(aorist_groups) ## Rate of change roc_weighted <- roc(aorist_weighted, n = 30) plot(roc_weighted) ## Rate of change by group roc_groups <- roc(aorist_groups, n = 30) plot(roc_groups)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.