Type: | Package |
Title: | Analysis of Intra Annual Density Fluctuations |
Version: | 0.1.3 |
Description: | Calculate false ring proportions from data frames of intra annual density fluctuations. |
License: | GPL-3 |
Encoding: | UTF-8 |
LazyData: | true |
Imports: | manipulate, tibble, dplyr, tidyr, dplR, rlang, stats, tidyselect |
Suggests: | lazyeval, testthat, knitr, rmarkdown |
RoxygenNote: | 7.2.3 |
VignetteBuilder: | knitr |
URL: | https://github.com/konradmayer/iadf |
BugReports: | https://github.com/konradmayer/iadf/issues |
NeedsCompilation: | no |
Packaged: | 2025-01-31 12:23:45 UTC; konrad |
Author: | Konrad Mayer [aut, cre], Filipe Campelo [aut] |
Maintainer: | Konrad Mayer <konrad.mayer@gmail.com> |
Repository: | CRAN |
Date/Publication: | 2025-01-31 13:30:02 UTC |
adjusted false ring proportion
Description
Calculate the adjusted false ring proportion, as suggested by Osborn et. al. (1997), of a set of binary false ring assignments.
Usage
afrp(iadf)
Arguments
iadf |
A data frame with numeric columns representing individual series and years as rownames where years with IADF are marked with 1, those without with 0, years not covered by the series are set to NA. |
Value
a data frame
References
Osborn TJ, Briffa KR and Jones PD (1997) Adjusting variance for sample-size in tree-ring chronologies and other regional mean time-series. Dendrochronologia 15, 89-99.
See Also
campelo_chapman
Description
Chapman model fitting to size classes for the calculation of size corrected IADF frequencies according to Campelo et al. (2015).
Usage
campelo_chapman(
campelo_freq_object,
min.n = 15,
start = NULL,
make.plot = TRUE,
max.iter = 500,
...
)
Arguments
campelo_freq_object |
a campelo frequency object,
output of |
min.n |
minimum number of samples within each group to be included in model estimation |
start |
set custom start values - default to
|
make.plot |
logical |
max.iter |
maximum iterations for internally used
|
... |
additional plotting arguments |
Value
a model object of class "nls"
References
Campelo, F., Vieira, J., Battipaglia, G. et al. Which matters most for the formation of intra-annual density fluctuations in Pinus pinaster: age or size? Trees (2015) 29: 237. doi:10.1007/s00468-014-1108-9
See Also
Examples
data('example_iadf')
data('example_rwl')
model <- campelo_chapman(campelo_freq(example_iadf, example_rwl))
campelo_index(example_iadf, example_rwl, model)
campelo_chapman_find_start
Description
Find good start values manually in case
campelo_chapman
returns an error caused by insufficient default starting values.
Usage
campelo_chapman_find_start(
campelo_freq_object,
min.n = 15,
max_a = 3,
max_b = 1,
max_c = 17
)
Arguments
campelo_freq_object |
a campelo frequency object,
output of |
min.n |
minimum number of samples within each group to be included in model estimation |
max_a |
maximum value of manipulate slider for parameter a |
max_b |
maximum value of manipulate slider for parameter b |
max_c |
maximum value of manipulate slider for parameter c |
Value
a list which can be used as input argument 'start' in
campelo_chapman
iadf frequency per ring width class
Description
Calculate the frequency per ring width class as suggested by Campelo (2015).
Usage
campelo_freq(iadf, rwl, n = 20)
Arguments
iadf |
A data frame with numeric columns representing individual series and years as rownames where years with IADF are marked binary with 1, those without with 0, years not covered by the series are set to NA. |
rwl |
data frame containing ring widths with years in rows and series in columns |
n |
number of ring width classes |
Value
a data frame
References
Campelo, F., Vieira, J., Battipaglia, G. et al. Which matters most for the formation of intra-annual density fluctuations in Pinus pinaster: age or size? Trees (2015) 29: 237. doi:10.1007/s00468-014-1108-9
See Also
campelo_chapman
, campelo_index
Examples
data('example_iadf')
data('example_rwl')
model <- campelo_chapman(campelo_freq(example_iadf, example_rwl))
campelo_index(example_iadf, example_rwl, model)
campelo_index
Description
Calculation of size corrected IADF frequencies according to Campelo et al. (2015)
Usage
campelo_index(iadf, rwl, model)
Arguments
iadf |
A data frame with numeric columns representing individual series and years as rownames where years with IADF are marked binary with 1, those without with 0, years not covered by the series are set to NA. |
rwl |
a rwl/data.frame object |
model |
a chapman model, output of |
Value
a data frame
References
Campelo, F., Vieira, J., Battipaglia, G. et al. Which matters most for the formation of intra-annual density fluctuations in Pinus pinaster: age or size? Trees (2015) 29: 237. doi:10.1007/s00468-014-1108-9
See Also
Examples
data('example_iadf')
data('example_rwl')
model <- campelo_chapman(campelo_freq(example_iadf, example_rwl))
campelo_index(example_iadf, example_rwl, model)
example_iadf
Description
An rwl object to be used in documented examples
Usage
example_iadf
Format
A data.frame with 135 years and 30 series.
example_rwl
Description
An rwl object to be used in documented examples
Usage
example_rwl
Format
A data.frame with 135 years and 30 series.
false ring proportion
Description
Calculate the false ring proportion of a set of binary false ring assignments.
Usage
frp(iadf)
Arguments
iadf |
A data frame with numeric columns representing individual series and years as rownames where years with IADF are marked binary with 1, those without with 0, years not covered by the series are set to NA. |
Value
a data frame
See Also
iadf
Description
calculate false ring proportions from data frames of intra annual density fluctuations
iadf frequency per cambial age
Description
Calculate the frequency per cambial age as suggested by Novak et al. (2013).
Usage
novak_freq(iadf, po = NULL)
Arguments
iadf |
A data frame with numeric columns representing individual series and years as rownames where years with IADF are marked binary with 1, those without with 0, years not covered by the series are set to NA. |
po |
a data frame with pith offsets with series names in the first and pith offset as number of rings in the second column |
Value
a data frame
References
Novak, Klemen and Sánchez, Miguel Angel Saz and Čufar, Katarina and Raventós, Josep and de Luis, Martin. Age, climate and intra-annual density fluctuations in in Spain, IAWA Journal, 34, 459-474 (2013), doi:10.1163/22941932-00000037
See Also
Examples
data('example_iadf')
model <- novak_weibull(novak_freq(example_iadf), 15)
novak_index(example_iadf, model)
novak_index
Description
Calculation of age corrected IADF frequencies according to Novak et al. (2013).
Usage
novak_index(iadf, model, po = NULL, method = "difference")
Arguments
iadf |
A data frame with numeric columns representing individual series and years as rownames where years with IADF are marked binary with 1, those without with 0, years not covered by the series are set to NA. |
model |
a model, output of either |
po |
an optional data frame of pith offsets with series names in the first and pith offsets in the second column |
method |
method for the RCS detrending, 'quotient' or 'difference' |
Value
a data frame
References
Novak, Klemen and Sánchez, Miguel Angel Saz and Čufar, Katarina and Raventós, Josep and de Luis, Martin. Age, climate and intra-annual density fluctuations in in Spain, IAWA Journal, 34, 459-474 (2013), doi:10.1163/22941932-00000037
See Also
Examples
data('example_iadf')
model <- novak_weibull(novak_freq(example_iadf), 15)
novak_index(example_iadf, model)
novak_weibull
Description
Fit a Weibull function for the calculation of age corrected IADF frequencies according to Novak et al. (2013).
Usage
novak_weibull(
novak_freq_object,
min.n = 15,
start = NULL,
max.iter = 500,
make.plot = TRUE,
...
)
Arguments
novak_freq_object |
A novak_freq_object as obtained from
|
min.n |
minimum number of samples within each cambial age to be included in model estimation |
start |
set custom start values - default to
|
max.iter |
maximum iterations for internally used
|
make.plot |
logical |
... |
additional plotting arguments |
Value
a model object of class "nls"
References
Novak, Klemen and Sánchez, Miguel Angel Saz and Čufar, Katarina and Raventós, Josep and de Luis, Martin. Age, climate and intra-annual density fluctuations in in Spain, IAWA Journal, 34, 459-474 (2013), doi:10.1163/22941932-00000037
See Also
Examples
data('example_iadf')
model <- novak_weibull(novak_freq(example_iadf), 15)
novak_index(example_iadf, model)
novak_weibull_find_start
Description
Find good start values manually in case
novak_weibull
returns an error caused by insufficient default starting values.
Usage
novak_weibull_find_start(
novak_freq_object,
min.n = 15,
max_a = 10,
max_b = 3,
max_c = 30
)
Arguments
novak_freq_object |
A novak_freq_object as obtained from
|
min.n |
minimum number of samples within each cambial age to be included in model estimation |
max_a |
maximum value of manipulate slider for parameter a |
max_b |
maximum value of manipulate slider for parameter b |
max_c |
maximum value of manipulate slider for parameter c |
Value
a list which can be used as input argument 'start' in
novak_weibull
series length
Description
returns the series length of the series within a data.frame/rwl object.
Usage
series_length(x)
Arguments
x |
a data.frame/rwl object |
Value
a numeric vector
sort_by_index
Description
internal function such as sortByIndex as in package dplR, shifts series to start with index 1, maintaining the same vector length by adding NA values to the end.
Usage
sort_by_index(x)
Arguments
x |
a numeric vector, representing an individual rwl series, potentially containing NA values. |
Value
a numeric vector with the same length as x.
Examples
x <- c(NA,NA,NA,1,2,3,4,5, NA, NA)
iadf:::sort_by_index(x)
#[1] 1 2 3 4 5 NA NA NA NA NA
tidy and untidy ring width data
Description
little helper functions to convert dataframes from the data format used in multiple dendro-related R packages such as dplR to tidy data used in the tidyverse and vice versa
Usage
tidy_crn(crn)
untidy_crn(tidy_crn)
tidy_rwl(rwl, value_col = "rwl")
untidy_rwl(tidy_rwl, value_col = "rwl")
Arguments
crn |
a chronology as obtained from |
tidy_crn |
a tidy chronology as obtained from |
rwl |
ring width data as obtained from |
value_col |
column name of the value column in the tidy tibble of the input resp output object |
tidy_rwl |
tidy ring width data as obtained from |
Value
data frames or tibbles
to_cambial_age
Description
This function aligns tree ring series to match their cambial ages, taking pith offset into account if provided.
Usage
to_cambial_age(rwl, po = NULL)
Arguments
rwl |
a data frame/rwl object. |
po |
optional, a data frame containing series names in the first and po data as nr. of years in the second column. |
Value
A data.frame with aligned series
Examples
library("dplR")
data("gp.rwl")
data("gp.po")
gp.po$series <- as.character(gp.po$series)
iadf:::to_cambial_age(gp.rwl, gp.po)