Hello everyone, i'm new to R programming and dendrochronology. I'm trying to calculate correlations between monthly precipitation averages and tree growth (tree ring data) using the dcc function. the problem is, I'm getting an error message: Error in is.finite(if (is.character(from)) from <- as.numeric(from) else from) :
default method not implemented for type 'list', and I don't know what it means. Can someone advise on both the meaning and the solution?
library(dplR)
library(treeclim)
library("TRADER")
library(utils)
library(ggplot2)
library(graphics)
# set working directory
setwd("F:/Obby/PhD/untitled folder/Dendrochronology/R scripts/For correlations/2800_Abies")
# AF28OFINAL
# read in measurements
chaf28o6 <- read.rwl("chaf28o6.rwl")
#
rwl.report(chaf28o6)
#
plot(chaf28o6, plot.type="spag")
# detrending all the series in the chaf2806 at once
chaf28o6.rwl <- detrend(rwl = chaf28o6, method = "Friedman")
#descriptive statistics
rwl.stats(chaf28o6[1:17])
#Building a Mean Value Chronology
chaf28o6.crn <- chron(chaf28o6.rwl, prefix = "CAM")
library(readr)
clim <- read_csv("Abies2800.csv")
View(clim)
#tractating the chronology data from (1884-2019) to (1950-2019)
a = (1:136)
b = as.data.frame(a)
b
c = cbind(b, chaf28o6.crn)
d.crn = chaf28o6.crn[c(67:136), ]
##response function analysis in treeclim - modeled after Dendroclim2002.
##Can take dynamic = "static", "moving", "evolving"
resp <- dcc(chrono = d.crn, climate = clim, selection = 1:10,
method = "correlation", dynamic = "static", win_size = 35, win_offset = 1, start_last = TRUE,
timespan = NULL, var_names = NULL, ci = 0.05, boot = "std", sb = FALSE)