Reads in Bacon output and formats it for inclusion in a download object.

  path = ".",
  add = FALSE,
  chron_name = "Bacon",
  as_default = TRUE,
  download = NULL,
  sections = NULL,
  age_field = "median",
  interp = TRUE



A folder path that contains a Bacon age file.


The location of the Cores folder.


Should the results be added to an existing download? Defaults to FALSE.


The name for the chronology if the Bacon file is being added to a download.


Should the chronology become the default?


The target download if add is TRUE.


If there are multiple Bacon runs in a folder, identify the file by the number of sections in the run.


Should the age be assigned to the "median" or the "wmean"?


If the depths don't match up, should we interpolate from the Bacon output? (default TRUE)


The function expects that you are in a working directory containing a "Cores" which would then contain output files from Bacon runs. The output can either be added to an existing record (for example, replacing the default age model returned by Neotoma), or it can be loaded on its own. If the depths for the loaded file do not match with the depths in the `download`'s `sample.meta` then the user can use the `interp` parameter to interpolate between depths. This method uses linear interpolation.


if (FALSE) { # Download the record for Lake O' Pines: lake_o_dl <- get_download(15925) # This assumes that you have Bacon installed in a folder and have # set it to your working directory. write_agefile(lake_o_dl[[1]], path = ".", chronology = 1, corename = "LAKEPINES", cal.prog = 'Bacon') source("Bacon.R") # These defaults just help the core run quickly, they're not # neccesarily good parameters. Bacon("LAKEPINES", acc.mean = 10, thick = 50, depths.file = TRUE, suggest = FALSE, ask = FALSE) lake_o_dl <- read_bacon("LAKEPINES", add = TRUE, download = download, sections = 17) }