# \donttest{
# Load processed demo data
dt.samples_trt <- readRDS(
system.file("extdata", "dt.samples_trt.rds",
package = "growthTrendR")
)
# prepare data for IDW model
cols.meta = c("uid_tree", "uid_site", "longitude", "latitude", "species")
dt.mapping <- dt.samples_trt$tr_all_wide[
, c(..cols.meta, as.character(1991:1995)), with = FALSE]
# Run spatial interpolation
mapping_results <- CFS_mapping(
dt.mapping,
year.span = c(1991, 1993)
)
# generate png plots
img_ani <- plot_mapping(
mapping_results = mapping_results,
parms.out = NULL,
dir.shp = NULL,
dir.out = NULL,
png.text = list(
text_top = "Ring width measurement - ",
text_bott = "Source: demo-samples",
text_side = "ring width (mm)"
)
)
# }
Run the code above in your browser using DataLab