yearPlot | R Documentation |
Visualize seasonality of time series
yearPlot(
dates,
values,
data,
ylim = NULL,
shift = 0,
janline = TRUE,
add = FALSE,
months = substr(month.abb, 1, 1),
xlab = "",
ylab = "",
zlab = "",
...
)
dates |
Dates, in any format coerced by |
values |
Values to be mapped in color with |
data |
Optional: data.frame from which to use dates and values. |
ylim |
(reverse) date range in numerical years.
DEFAULT: NULL (computed from |
shift |
Number of days to move the year-break to. E.g. shift=61 for German hydrological year (Nov to Oct). DEFAULT: 0 |
janline |
Logical: Should vertical line be plotted at
January 1st if |
add |
Logical. Add to existing plot? DEFAULT: FALSE |
months |
Labels for the months. DEFAULT: J,F,M,A,M,J,J,A,S,O,N,D |
xlab , ylab , zlab |
Axis and legend labels. DEFAULT: "" |
... |
Further arguments passed to |
invisible list with coordinates
Berry Boessenkool, berry-b@gmx.de, Sept 2019
seasonality
, colPoints
,
qfile <- system.file("extdata/discharge39072.csv", package="berryFunctions")
Q <- read.table(qfile, skip=19, header=TRUE, sep=",", fill=TRUE)[,1:2]
Q$data <- as.Date(Q$data)
yearPlot(data, last, data=Q)
yearPlot(as.Date(c("2011-06-07","2009-03-25")), 1:2, add=TRUE, pch=3, col=1, legend=FALSE)
yearPlot(data, last, data=Q, shift=61)
yearPlot(data, last, data=Q, ylim=c(2015,2001))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.