diff --git a/.Rproj.user/429CC01A/pcs/files-pane.pper b/.Rproj.user/429CC01A/pcs/files-pane.pper
index 98d533d..05deffc 100644
--- a/.Rproj.user/429CC01A/pcs/files-pane.pper
+++ b/.Rproj.user/429CC01A/pcs/files-pane.pper
@@ -5,5 +5,5 @@
"ascending": false
}
],
- "path": "C:/Users/hanecakr/Documents/R_github/fellingdateR/tests/testthat"
+ "path": "C:/Users/hanecakr/Documents/R_github/fellingdateR"
}
\ No newline at end of file
diff --git a/.Rproj.user/429CC01A/pcs/source-pane.pper b/.Rproj.user/429CC01A/pcs/source-pane.pper
index 52e14df..88cc03e 100644
--- a/.Rproj.user/429CC01A/pcs/source-pane.pper
+++ b/.Rproj.user/429CC01A/pcs/source-pane.pper
@@ -1,4 +1,4 @@
{
- "activeTab": 21,
+ "activeTab": 22,
"activeTabSourceWindow0": 0
}
\ No newline at end of file
diff --git a/.Rproj.user/429CC01A/pcs/windowlayoutstate.pper b/.Rproj.user/429CC01A/pcs/windowlayoutstate.pper
index 73579c6..25b4fbe 100644
--- a/.Rproj.user/429CC01A/pcs/windowlayoutstate.pper
+++ b/.Rproj.user/429CC01A/pcs/windowlayoutstate.pper
@@ -1,12 +1,12 @@
{
"left": {
- "splitterpos": 349,
+ "splitterpos": 216,
"topwindowstate": "NORMAL",
"panelheight": 830,
"windowheight": 868
},
"right": {
- "splitterpos": 307,
+ "splitterpos": 306,
"topwindowstate": "NORMAL",
"panelheight": 830,
"windowheight": 868
diff --git a/.Rproj.user/429CC01A/pcs/workbench-pane.pper b/.Rproj.user/429CC01A/pcs/workbench-pane.pper
index f6ced2a..c38a0b3 100644
--- a/.Rproj.user/429CC01A/pcs/workbench-pane.pper
+++ b/.Rproj.user/429CC01A/pcs/workbench-pane.pper
@@ -1,5 +1,5 @@
{
"TabSet1": 4,
- "TabSet2": 1,
+ "TabSet2": 0,
"TabZoom": {}
}
\ No newline at end of file
diff --git a/R/fd_report.R b/R/fd_report.R
index a53cf72..bac8c08 100644
--- a/R/fd_report.R
+++ b/R/fd_report.R
@@ -122,15 +122,8 @@ fd_report <- function(x,
}
waneyedge <- df[[waneyedge]] # check is.logical
if (!is.logical(waneyedge)) {
- warning(
- "--> 'waneyedge' should be a logical vector (TRUE/FALSE),
-indicating the presence of waney edge.\n",
-"--> Converted to TRUE/FALSE based on presence of string 'wK'."
- )
- waneyedge <-
- ifelse(grepl("wk", waneyedge, ignore.case = TRUE),
- TRUE,
- FALSE)
+ stop("--> 'waneyedge' should be a logical vector (TRUE/FALSE),
+indicating the presence of waney edge.\n")
}
if (is.na(credMass) || credMass <= 0 || credMass >= 1)
stop("--> credMass must be between 0 and 1")
@@ -148,7 +141,7 @@ indicating the presence of waney edge.\n",
if (length(sw_OK) < length(sw_data)) {
stop(
sprintf(
- "'%s' is not a supported sapwood model, or file doesn't exist\n",
+ "'%s' is not a supported sapwood model, or file does not exist\n",
sw_data[-sw_OK]
)
)
diff --git a/R/sw_combine.R b/R/sw_combine.R
index f58bd5b..ec5922f 100644
--- a/R/sw_combine.R
+++ b/R/sw_combine.R
@@ -88,17 +88,9 @@ Some values are possibly missing or the values are not numeric"
cambium <- x[, waneyedge]
if (!is.logical(cambium)) {
- warning(
- "--> Column 'waneyedge' should be logical (TRUE/FALSE), indicating
-the presence of waney edge.\n",
-"--> Converted to TRUE/FALSE based on presence of string 'wK'."
- )
- x[, waneyedge] <-
- ifelse(grepl("wk", x[, waneyedge], ignore.case = TRUE),
- TRUE,
- FALSE)
+ stop("--> 'waneyedge' should be logical vector (TRUE/FALSE), indicating
+the presence of waney edge.\n")
}
- cambium <- x[, waneyedge]
timeAxis <- seq(min(endDate) - 3, max(endDate) + 100, by = 1)
diff --git a/R/sw_interval.R b/R/sw_interval.R
index c9e5e7b..f192fa3 100644
--- a/R/sw_interval.R
+++ b/R/sw_interval.R
@@ -73,7 +73,7 @@ sw_interval <- function(n_sapwood = NA,
file.exists(sw_data))) {
stop(
sprintf(
- "'%s' is not a supported sapwood model, or file doesn't exist\n",
+ "'%s' is not a supported sapwood model, or file does not exist\n",
sw_data
)
)
diff --git a/R/sw_sum.R b/R/sw_sum.R
index e82d309..040827d 100644
--- a/R/sw_sum.R
+++ b/R/sw_sum.R
@@ -56,32 +56,8 @@ sw_sum <- function (x,
cambium <- df[[waneyedge]]
if (!is.logical(cambium)) {
- which_wk <- which(grepl("wk", cambium, ignore.case = TRUE))
- converted_T <- cambium[which_wk]
- converted_F <- cambium[-which_wk]
- cambium <-
- ifelse(grepl("wk", cambium, ignore.case = TRUE),
- TRUE,
- FALSE)
- warning(
- paste0(
- "Column 'waneyedge' in data.frame should be:\n",
- "a logical vector (TRUE/FALSE), indicating the presence of waney edge.\n"
- )
- )
- warning(
- sprintf(
- "'%s' --> Converted to TRUE based on presence of string 'wK'.\n",
- converted_T
- )
- )
- warning(
- sprintf(
- "'%s' --> Converted to FALSE based on absence of string 'wK'.\n",
- converted_F
- )
- )
-
+ stop("--> 'waneyedge' should be logical vector (TRUE/FALSE), indicating
+the presence of waney edge.\n")
}
swr <- df[[n_sapwood]]
diff --git a/README.Rmd b/README.Rmd
index 02a8710..efefb75 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -264,6 +264,9 @@ This function also works with ring-width data in CHRONO and HALF-CHRONO format.
Furthermore, the `read_fh()` function is case insensitive.
+
+In the example below, an .fh file with dated tree-ring series from a medieval ship DOEL1 is read with `read_fh()`. The ring width measurement, in different formats, are converted to a `data.frame`.
+
```{r}
Doel1 <- system.file("extdata", "DOEL1.fh", package = "fellingdateR")
@@ -273,9 +276,40 @@ head(Doel1_trs, 15)
```
-When `header = TRUE`, the `get_header()` function is triggered and HEADER fields in the .fh file are returned as a `data.frame`.
+When `header = TRUE`, the `get_header()` function is triggered and HEADER fields in the .fh file are returned as a `data.frame`, instead of the ring width measurements.
```{r}
read_fh(Doel1, verbose = FALSE, header = TRUE)
```
+
+The `data.frame` with the HEADER fields can then be used as input for the sw_functions:
+
+```{r}
+Doel1_header <- read_fh(Doel1, verbose = FALSE, header = TRUE)
+
+Doel1_header |>
+ # first convert column 'waneyedge' to a logical vector (in the original .fh file header fields the presence of waney edge is indicated by "WK" - a character string - in the corresponding HEADER field)
+ dplyr::mutate(waneyedge = dplyr::if_else(grepl("wk", waneyedge, ignore.case = TRUE),
+ TRUE, FALSE)
+ ) |>
+ sw_combine(plot = TRUE)
+
+```
+
+The attempt to combine the dated tree-ring series from DOEL1 into a single felling-date range fails. These tree-ring series cannot represent a single event.
+
+However, leaving out the tree-ring series of the keelplank (series "K1_091") of this medieval ship shows that the hull planking and some frame elements could share a common felling date:
+
+```{r}
+Doel1_header |>
+ dplyr::mutate(waneyedge = dplyr::if_else(grepl("wk", waneyedge, ignore.case = TRUE),
+ TRUE, FALSE)
+ ) |>
+ dplyr::filter(series != "K1_091") |>
+ sw_combine(plot = TRUE)
+```
+
+For more details see: Haneca K. & Daly A. (2014). Tree-Rings, Timbers and Trees: a dendrochronological survey of the 14th-century cog, Doel 1. _International Journal of Nautical Archaeology_ 43, 87–102. https://doi.org/10.1111/1095-9270.12037
+
+
diff --git a/README.md b/README.md
index 8f999c7..231875b 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,3 @@
-
# `fellingdateR`: estimating felling dates from historical tree-ring series
@@ -6,34 +5,20 @@
[![R-CMD-check](https://github.com/hanecakr/fellingDateR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/hanecakr/fellingDateR/actions/workflows/R-CMD-check.yaml)
+
-This R-package offers a set of functions that can assist you to infer
-felling date estimates from dated tree-ring series. The presence of
-(partially) preserved sapwood or waney edge allows to estimate a range
-for the actual felling date, for individual series as well as for a
-group of timbers. Furthermore, an additional function provides a tool to
-sum sapwood probability distributions, comparable to ‘summed probability
-densities’ commonly applied to sets of radiocarbon (14C)
-dates.
+This R-package offers a set of functions that can assist you to infer felling date estimates from dated tree-ring series. The presence of (partially) preserved sapwood or waney edge allows to estimate a range for the actual felling date, for individual series as well as for a group of timbers. Furthermore, an additional function provides a tool to sum sapwood probability distributions, comparable to 'summed probability densities' commonly applied to sets of radiocarbon (14C) dates.
![](man/figures/roof_cores.png)
-Where it can be assumed that a group of historical timbers were all
-felled at the same time (i.e. in the same year), but due to the absence
-of the bark/cambial zone (waney edge) and the last formed tree ring this
-cannot be assessed, the preserved sapwood rings can be used to infer a
-date range for the felling date.
+Where it can be assumed that a group of historical timbers were all felled at the same time (i.e. in the same year), but due to the absence of the bark/cambial zone (waney edge) and the last formed tree ring this cannot be assessed, the preserved sapwood rings can be used to infer a date range for the felling date.
-Taking into account the observed number of sapwood rings on all samples
-and combining them into a single estimate, is likely to provide a more
-accurate and precise estimate of the felling date year for the group of
-timbers under study.
+Taking into account the observed number of sapwood rings on all samples and combining them into a single estimate, is likely to provide a more accurate and precise estimate of the felling date year for the group of timbers under study.
## Installation
-You can install the development version of fellingddateR from
-[GitHub](https://github.com/) with:
+You can install the development version of fellingddateR from [GitHub](https://github.com/) with:
``` r
#install.packages("devtools")
@@ -48,8 +33,7 @@ pak::pak("hanecakr/fellingdateR")
## Basic example
-In the following example the combined felling date range for a set of
-five dated tree-ring series is computed:
+In the following example the combined felling date range for a set of five dated tree-ring series is computed:
``` r
library(fellingdateR)
@@ -69,54 +53,30 @@ dummy1
sw_combine(dummy1, plot = TRUE)
```
- The light
-grey distributions represent the probability density function of the
-felling date range for each individual series. The dark grey
-distribution is the combined estimate for a common felling date.
+ The light grey distributions represent the probability density function of the felling date range for each individual series. The dark grey distribution is the combined estimate for a common felling date.
-The sapwood data used in the example above to estimate the felling date
-range, was published by Hollstein in 1980:
+The sapwood data used in the example above to estimate the felling date range, was published by Hollstein in 1980:
``` r
sw_model("Hollstein_1980")
```
-
+
## Motivation
-This package was developed during the analysis of a large data set of
-tree-ring series that originate from medieval timber constructions in
-[Bruges](https://en.wikipedia.org/wiki/Bruges) (Belgium). The results of
-this study were published in
-[*Dendrochronologia*](https://www.journals.elsevier.com/dendrochronologia).
-
-> Kristof HANECA
-> [![](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0002-7719-8305),
-> Vincent DEBONNE, Patrick HOFFSUMMER 2020. The ups and downs of the
-> building trade in a medieval city: tree-ring data as proxies for
-> economic, social and demographic dynamics in Bruges (*c.* 1200 –
-> 1500). *Dendrochronologia* 64, 125773.
+This package was developed during the analysis of a large data set of tree-ring series that originate from medieval timber constructions in [Bruges](https://en.wikipedia.org/wiki/Bruges) (Belgium). The results of this study were published in [*Dendrochronologia*](https://www.journals.elsevier.com/dendrochronologia).
+
+> Kristof HANECA [![](https://orcid.org/sites/default/files/images/orcid_16x16.png)](https://orcid.org/0000-0002-7719-8305), Vincent DEBONNE, Patrick HOFFSUMMER 2020. The ups and downs of the building trade in a medieval city: tree-ring data as proxies for economic, social and demographic dynamics in Bruges (*c.* 1200 -- 1500). *Dendrochronologia* 64, 125773.\
>
## Main functions
### sw_interval
-This function computes the probability density function (PDF) and
-highest probability density interval (hdi) of the felling date range
-based on the observed number of sapwood rings, their chronological
-dating and the selected sapwood data and model.
-
-In the example below, 10 sapwood rings were observed on a sample (last
-ring dated to 1234 AD) that is supposed to have a provenance in the
-Southern Baltic region (sapwood model published by Wazny, 1990). The hdi
-delineates an interval in which the actual felling date is most likely
-situated. It is the shortest interval within a probability distribution
-for a given probability mass or credible interval. The hdi summarizes
-the distribution by specifying an interval that spans most of the
-distribution, say 95% of it, as such that every point inside the
-interval has higher credibility than any point outside the interval.
+This function computes the probability density function (PDF) and highest probability density interval (hdi) of the felling date range based on the observed number of sapwood rings, their chronological dating and the selected sapwood data and model.
+
+In the example below, 10 sapwood rings were observed on a sample (last ring dated to 1234 AD) that is supposed to have a provenance in the Southern Baltic region (sapwood model published by Wazny, 1990). The hdi delineates an interval in which the actual felling date is most likely situated. It is the shortest interval within a probability distribution for a given probability mass or credible interval. The hdi summarizes the distribution by specifying an interval that spans most of the distribution, say 95% of it, as such that every point inside the interval has higher credibility than any point outside the interval.
``` r
sw_interval(n_sapwood = 10,
@@ -129,11 +89,9 @@ sw_interval(n_sapwood = 10,
#> 1 1234 1250 0.9611793
```
-When `hdi = FALSE` a matrix is returned with scaled p values for each
-number of observed sapwood rings.
+When `hdi = FALSE` a matrix is returned with scaled p values for each number of observed sapwood rings.
-The results of this procedure can be visualized by setting
-`plot = TRUE`.
+The results of this procedure can be visualized by setting `plot = TRUE`.
``` r
# 10 sapwood rings observed and the Wazny 1990 sapwood model:
@@ -146,12 +104,11 @@ sw_interval(n_sapwood = 10,
plot = T)
```
-
+
### fd_report
-Reporting estimates of the felling date range for individual series, is
-provided by the `fd_report()` function.
+Reporting estimates of the felling date range for individual series, is provided by the `fd_report()` function.
``` r
tmp <- data.frame(id = c("aaa", "bbb", "ccc"),
@@ -171,31 +128,19 @@ fd_report(tmp,
### sw_combine
-The procedure to combine felling dates of a group of related, individual
-series with (partially) preserved sapwood, in order to narrow down the
-range of a common felling date is provided by the `sw_combine()`
-function. It returns a list with:
+The procedure to combine felling dates of a group of related, individual series with (partially) preserved sapwood, in order to narrow down the range of a common felling date is provided by the `sw_combine()` function. It returns a list with:
-- the pdf for the felling date of the individual series and the pdf of
- the model that combines these individual series (`$dataRaw`),
+- the pdf for the felling date of the individual series and the pdf of the model that combines these individual series (`$dataRaw`),
-- the hdi for the combined estimate of the common felling date
- (`$hdi_model`),
+- the hdi for the combined estimate of the common felling date (`$hdi_model`),
-- the *Agreement index* (`$A_comb`) of the model, expressing how well
- the individual series fit into the model (ideally around 100%, and not
- lower than the critical threshold A_c = 60%) ,
+- the *Agreement index* (`$A_comb`) of the model, expressing how well the individual series fit into the model (ideally around 100%, and not lower than the critical threshold A_c = 60%) ,
-- an overview of the felling date range for the individual series
- (`$individual_series`), and their *Agreement index* (A_i) to the
- combined model.
+- an overview of the felling date range for the individual series (`$individual_series`), and their *Agreement index* (A_i) to the combined model.
#### dummy0
-A data set with dated tree-ring series which all have partially
-preserved sapwood. The names of the variables in the data set are mapped
-to the parameters of the `sw_combine()` function. In the example below,
-the numeric output is returned:
+A data set with dated tree-ring series which all have partially preserved sapwood. The names of the variables in the data set are mapped to the parameters of the `sw_combine()` function. In the example below, the numeric output is returned:
``` r
@@ -279,8 +224,7 @@ output_comb[-1]
#### dummy2
-A data set with 5 tree-ring series of which one has an exact felling
-date:
+A data set with 5 tree-ring series of which one has an exact felling date:
``` r
dummy2
@@ -293,12 +237,11 @@ dummy2
sw_combine(dummy2, plot = TRUE)
```
-
+
#### dummy3
-A data set where all tree-ring series have been measured up to the waney
-edge:
+A data set where all tree-ring series have been measured up to the waney edge:
``` r
dummy3
@@ -311,12 +254,11 @@ dummy3
sw_combine(dummy3, plot = TRUE)
```
-
+
#### dummy4
-An attempt to compute a common felling date for a group of tree-ring
-series. All series include partially preserved sapwood:
+An attempt to compute a common felling date for a group of tree-ring series. All series include partially preserved sapwood:
``` r
dummy4
@@ -329,17 +271,11 @@ dummy4
sw_combine(dummy4, plot = TRUE)
```
- No
-common felling date can be computed for this particular data set. The
-model fails (agreement index of the model is below the critical
-threshold value (A_c) of 60%). Three series have an individual agreement
-index below 60%.
+ No common felling date can be computed for this particular data set. The model fails (agreement index of the model is below the critical threshold value (A_c) of 60%). Three series have an individual agreement index below 60%.
#### dummy5
-When no sapwood rings are observed and measured, only an
-`earliest possible felling date` (*terminus post quem*) can be
-determined:
+When no sapwood rings are observed and measured, only an `earliest possible felling date` (*terminus post quem*) can be determined:
``` r
dummy5
@@ -351,25 +287,23 @@ dummy5
sw_combine(dummy5, plot = TRUE)
```
-
+
### sw_sum
-The `sw_sum()` function computes the the summed probability density
-(SPD) for a set of felling date ranges.
+The `sw_sum()` function computes the the summed probability density (SPD) for a set of felling date ranges.
``` r
sw_sum(dummy7, plot = TRUE)
```
-
+
## Helper functions
### sw_data_overview
-The function `sw_data_overview()` provides an overview of all published
-sapwood data sets that are distributed with this package.
+The function `sw_data_overview()` provides an overview of all published sapwood data sets that are distributed with this package.
``` r
sw_data_overview()
@@ -383,9 +317,7 @@ Load the original data with, e.g. `get("Hollstein_1980")`.
### sw_data_info
-More information on one of the sapwood data sets - how to cite the data
-set, the area the data represents, the number of observations and some
-basic summary stats - can be retrieved by the `sw_data_info()` function.
+More information on one of the sapwood data sets - how to cite the data set, the area the data represents, the number of observations and some basic summary stats - can be retrieved by the `sw_data_info()` function.
``` r
sw_data_info("Pilcher_1987")
@@ -408,15 +340,14 @@ sw_data_info("Pilcher_1987")
### sw_model
-A graphical representation of a sapwood data set is provided by the
-`sw_model()` function.
+A graphical representation of a sapwood data set is provided by the `sw_model()` function.
``` r
sw_model("Sohar_2012_ELL_c")
```
-
+
``` r
@@ -438,15 +369,12 @@ sw_data_info("Sohar_2012_ELL_c")
#> 2.00 10.00 12.00 11.69 13.00 27.00
```
-The `sw_model()` function allows to fit a distribution to a data set of
-observed sapwood numbers and computes the highest posterior density
-interval (hdi) for a given credibility mass. The density function fitted
-to the sapwood data set should be one of:
+The `sw_model()` function allows to fit a distribution to a data set of observed sapwood numbers and computes the highest posterior density interval (hdi) for a given credibility mass. The density function fitted to the sapwood data set should be one of:
-- “lognormal” (the default value),
-- “normal”,
-- “weibull”,
-- “gamma”.
+- "lognormal" (the default value),
+- "normal",
+- "weibull",
+- "gamma".
The credible interval should be a value between 0 and 1.
@@ -455,26 +383,20 @@ sw_model("Wazny_1990", densfun = "gamma", credMass= .90, plot = TRUE)
#> Warning in densfun(x, parm[1], parm[2], ...): NaNs produced
```
-
+
-When `plot = FALSE`, a list with the numeric output of the modelling
-process is returned.
+When `plot = FALSE`, a list with the numeric output of the modelling process is returned.
### read_fh and get_header
-The `read_fh()` function is an extension to the `dplR::read.fh()`
-function from the [**dplR package**](https://github.com/AndyBunn/dplR)
-([Bunn 2008](https://doi.org/10.1016/j.dendro.2008.01.002), [Bunn
-2010](https://doi.org/10.1016/j.dendro.2009.12.001), [Bunn *et al.*
-2022](https://github.com/AndyBunn/dplR)). It allows to read .fh (format
-Heidelberg) files of ring widths AND additional information found in the
-HEADER fields are listed as attributes.
+The `read_fh()` function is an extension to the `dplR::read.fh()` function from the [**dplR package**](https://github.com/AndyBunn/dplR) ([Bunn 2008](https://doi.org/10.1016/j.dendro.2008.01.002), [Bunn 2010](https://doi.org/10.1016/j.dendro.2009.12.001), [Bunn *et al.* 2022](https://github.com/AndyBunn/dplR)). It allows to read .fh (format Heidelberg) files of ring widths AND additional information found in the HEADER fields are listed as attributes.
-This function also works with ring-width data in CHRONO and HALF-CHRONO
-format.
+This function also works with ring-width data in CHRONO and HALF-CHRONO format.
Furthermore, the `read_fh()` function is case insensitive.
+In the example below, an .fh file with dated tree-ring series from a medieval ship DOEL1 is read with `read_fh()`. The ring width measurement, in different formats, are converted to a `data.frame`.
+
``` r
Doel1 <- system.file("extdata", "DOEL1.fh", package = "fellingdateR")
@@ -499,8 +421,7 @@ head(Doel1_trs, 15)
#> 1164 2.83 NA NA NA 3.91 NA NA 1.84 NA NA
```
-When `header = TRUE`, the `get_header()` function is triggered and
-HEADER fields in the .fh file are returned as a `data.frame`.
+When `header = TRUE`, the `get_header()` function is triggered and HEADER fields in the .fh file are returned as a `data.frame`, instead of the ring width measurements.
``` r
read_fh(Doel1, verbose = FALSE, header = TRUE)
@@ -560,3 +481,35 @@ read_fh(Doel1, verbose = FALSE, header = TRUE)
#> 9 KH
#> 10 EH
```
+
+The `data.frame` with the HEADER fields can then be used as input for the sw_functions:
+
+``` r
+Doel1_header <- read_fh(Doel1, verbose = FALSE, header = TRUE)
+
+Doel1_header |>
+ # first convert column 'waneyedge' to a logical vector (in the original .fh file header fields the presence of waney edge is indicated by "WK" - a character string - in the corresponding HEADER field)
+ dplyr::mutate(waneyedge = dplyr::if_else(grepl("wk", waneyedge, ignore.case = TRUE),
+ TRUE, FALSE)
+ ) |>
+ sw_combine(plot = TRUE)
+```
+
+
+
+The attempt to combine the dated tree-ring series from DOEL1 into a single felling-date range fails. These tree-ring series cannot represent a single event.
+
+However, leaving out the tree-ring series of the keelplank (series "K1_091") of this medieval ship shows that the hull planking and some frame elements could share a common felling date:
+
+``` r
+Doel1_header |>
+ dplyr::mutate(waneyedge = dplyr::if_else(grepl("wk", waneyedge, ignore.case = TRUE),
+ TRUE, FALSE)
+ ) |>
+ dplyr::filter(series != "K1_091") |>
+ sw_combine(plot = TRUE)
+```
+
+
+
+For more details see: Haneca K. & Daly A. (2014). Tree-Rings, Timbers and Trees: a dendrochronological survey of the 14th-century cog, Doel 1. *International Journal of Nautical Archaeology* 43, 87--102.
diff --git a/man/figures/README-unnamed-chunk-12-1.png b/man/figures/README-unnamed-chunk-12-1.png
new file mode 100644
index 0000000..0aecca6
Binary files /dev/null and b/man/figures/README-unnamed-chunk-12-1.png differ
diff --git a/man/figures/README-unnamed-chunk-13-1.png b/man/figures/README-unnamed-chunk-13-1.png
new file mode 100644
index 0000000..25d7f4f
Binary files /dev/null and b/man/figures/README-unnamed-chunk-13-1.png differ
diff --git a/tests/testthat/test-fd_report.R b/tests/testthat/test-fd_report.R
index 9c6672e..8a262d5 100644
--- a/tests/testthat/test-fd_report.R
+++ b/tests/testthat/test-fd_report.R
@@ -72,7 +72,7 @@ testthat::test_that("waneyedge must be boolean", {
n_sapwood = c(10, 11, 12),
waneyedge = c("ja", "nee", 345),
last = c(123, 456, 1789))
- testthat::expect_warning(
+ testthat::expect_error(
fd_report(testdata
),
regexp = "waneyedge"