# Generate example data
GenerateExampleProxyTS <- function(n, start.age, end.age, seed = 1){
set.seed(seed)
clim <- round(PaleoSpec::SimPowerlaw(1, end.age - start.age), 2)
age <- sort(round(runif(n, start.age, end.age)))
example.proxy.ts <- data.frame(
age = age,
value = clim[age-start.age+1]
)
plot(example.proxy.ts, type = "b")
#assign(paste0("example.proxy.ts.", seed), example.proxy.ts)
#devtools::use_data(get(paste0("example.proxy.ts.", seed)), overwrite = T)
write.table(example.proxy.ts, file = paste0("inst/extdata/example.proxy.ts.", seed, ".csv"), row.names = FALSE, sep = ";")
return(example.proxy.ts)
}
GenerateExampleProxyTS(n = 30, start.age = 1000, end.age = 15000, seed = 1)
GenerateExampleProxyTS(n = 30, start.age = 1000, end.age = 15000, seed = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.