This function will create a model in a LiPD object, adding ensemble data

createModel(
  L,
  depth.or.age.vector = NA,
  ensemble.data,
  paleo.or.chron = "chronData",
  paleo.or.chron.num = NA,
  model.num = NA,
  ens.table.num = 1,
  depth.or.age.var = "depth",
  depth.or.age.units = "cm",
  ens.var = "ageEnsemble",
  ens.units = "yr BP",
  make.new = TRUE,
  methods = NA,
  create.summary.table = TRUE
)

Arguments

L

A LiPD object - an R serialization of a single LiPD file. It's a list, and is typically created by `readLipd()`

depth.or.age.vector

A vector of data for the ensemble data that records the position

ensemble.data

A matrix or data.frame of ensemble data, with ensemble members in separate columns

paleo.or.chron

"paleoData" or "chronData"

paleo.or.chron.num

an integer that corresponds to paleo.num or chron Data object (L$<paleo.or.chron>[[?]]) has the variable you want?

model.num

an integer that corresponds to model.num that has the variable you want

ens.table.num

an integer that corresponds to ensembleTable you want to get the variable from?

depth.or.age.var

A string describing the name of the depth or age vector (default = "depth")

depth.or.age.units

Units for depth.or.age.var (default = "cm")

ens.var

A string describing the name of the ensemble data (default = "age")

ens.units

Units for the ensemble data (default = "yr BP")

make.new

Create a new model? (default = TRUE)

methods

Optionally add in a list describing the methods used to make the model (default = NA)

create.summary.table

Optionally create a summary table derived from the ensemble data (default = TRUE)

Value

a model object