Closed chrisdane closed 1 year ago
Hi Chris. That example is set to not run because of time considerations when checking the library. But, it runs fine for me and that's what I'd expect since cana157[, 1]
is cana157$TTRSTD
(e.g., all(cana157[,1]==cana157$TTRSTD)
). Can you confirm that this doesn't run and give me the output from sessionInfo()
as well? Thx, A
library(dplR)
data(cana157)
all(cana157[,1]==cana157$TTRSTD)
x <- cana157[, 1]
redf.x <- redfit(x, nsim = 1000)
Ouh jeah it works also for me. I probably made a copy-paste mistake or whatever, sorry for this.
But the second error really is there :D
Interesting. So this throws the error.
x <- rnorm(cumsum(100))
redf.x <- dplR::redfit(x)
But this doesn't
library(dplR)
redf.x <- redfit(x)
My initial guess is something to do with the NAMESPACE. I'll look into it when I get the chance. Thx.
Think this is fixed in the dev version.
I'm still getting the same error message after installing the dev version with remote::install_github()
. But I also get it after library(dplR)
if I leave the function call as dplR::redfit
rather than redfit
.
EDIT: to make it reproducible:
# no library
data(cana157, package = "dplR")
dplR::redfit(cana157$TTRSTD)
#> Error in match.fun(as.list(cl)[[1]]) :
#> 'as.list(dplR::redfit(x = cana157$TTRSTD))[[1]]' is not a function, character or symbol
library(dplR)
#> This is dplR version 1.7.7.
#> dplR is part of openDendro https://opendendro.org.
#> New users can visit https://opendendro.github.io/dplR-workshop/ to get started.
dplR::redfit(cana157$TTRSTD)
#> Error in match.fun(as.list(cl)[[1]]) :
#> 'as.list(dplR::redfit(x = cana157$TTRSTD))[[1]]' is not a function, character or symbol
redfit(cana157$TTRSTD)
#> redfit() in dplR version 1.7.7
#>
#> Input:
#> ------
#> ofac = 4
#> hifac = 1
#> n50 = 3
#> iwin = 2
#> nsim = 1000
#>
#> Initial values:
#> ---------------
#> Data variance (from data spectrum) = 0.02679094
#> Avg. dt = 1
#>
#> Results:
#> --------
#> Avg. autocorr. coeff., rho = 0.5233948
#> Avg. tau = 1.544594
#> Degrees of freedom = 5.785714
#> 6-dB Bandwidth = 0.00862069
#> Critical false-alarm level (Thomson, 1990) = 99.56897
#> ==> corresponding scaling factor for red noise = 3.203169
#>
#> Equality of theoretical and data spectrum: Runs test
#> ----------------------------------------------------
#> Test requires iwin = 0
#> Test requires ofac = 1
#> Test requires n50 = 1
Hi
Two small things (dplR version 1.7.2). The last line of the redfit example
yields the error
Instead, it must be
In addition, the very similar call
yields the error
Cheers, Chris