Insert a sample information section in RMarkdown reports. Use this function within a code chunk and make sure to set the chunk option results = 'asis'.

report_Sample(x = .sample(), delim)

.sample(sample = NA, type = NA, exp_age = NA, n_aliquots = NA,
  measurement_dates = NA, irr_doses = NA)

Arguments

x

list (required): A named list with information on the following elements given in .sample. Consider using .sample as a constructor.

delim

character (required): Keyword specifying the delimiter insterted before the section. Usually "<br>" or "<hr>" for HTML and "\\newpage" for PDF reports.

sample

character: Sample name or laboratory code.

type

character: Sample type (e.g., "Coral" or "Mollusc").

exp_age

character: The expected age range.

n_aliquots

character: Number of aliquots used to determine the equivalent dose.

measurement_dates

character: When were the measurements conducted?

irr_doses

character: Irradiation doses (in Gy) of the individual aliquots.

Value

Text output via cat.

Examples

report_Sample(x = list("K9999", "Coral", "Holocene", 20, "29/02/2016", 1:20), delim = "\\newpage")
#> #> #> \newpage #> #> # Sample information #> #> **Sample**: K9999 #> #> **Type**: Coral #> #> **Expected age range**: Holocene #> #> **Number of aliquots**: 20 #> #> **Date of measurement(s)**: 29/02/2016 #> #> **Irradiation doses (Gy)**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 #>
report_Sample(.sample(sample = "K9999", type = "Coral", exp_age = "Holocene", n_aliquots = 20, measurement_dates = "29/02/2016", irr_dose = 1:20), delim = "\\newpage")
#> #> #> \newpage #> #> # Sample information #> #> **Sample**: K9999 #> #> **Type**: Coral #> #> **Expected age range**: Holocene #> #> **Number of aliquots**: 20 #> #> **Date of measurement(s)**: 29/02/2016 #> #> **Irradiation doses (Gy)**: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20 #>