# --- Create dummy data
mydat <- data.frame(TimeCode = seq(as.Date("2008/1/1"), as.Date("2017/1/1"), "years"),
YValue = sample(1:500/10, 10))
# --- Plot the dummy data
plotTS(mydat,
xvar = "TimeCode",
xlabel = "Year",
yvar = "YValue",
ylabel = "Rate per 100 000 population",
log10_scale = FALSE,
xvar_format = "%Y",
xvar_breaks = "1 year")
Run the code above in your browser using DataLab