In addition to the datasets, the pathways in the degradation model can be specified as well.

CAKE_export(
ds,
map = c(parent = "Parent"),
filename = "CAKE_export.csf",
path = ".",
overwrite = FALSE,
description = "",
time_unit = "days",
res_unit = "% AR",
comment = "",
date = Sys.Date(),
optimiser = "IRLS"
)

## Arguments

ds

A named list of datasets in long format as compatible with mkinfit.

map

A character vector with CAKE compartment names (Parent, A1, ...), named with the names used in the list of datasets.

An optional character vector of target compartments, named with the names of the source compartments. In order to make this easier, the names are used as in the datasets supplied.

filename

Where to write the result. Should end in .csf in order to be compatible with CAKE.

path

An optional path to the output file.

overwrite

If TRUE, existing files are overwritten.

study

The name of the study.

description

An optional description.

time_unit

The time unit for the residue data.

res_unit

The unit used for the residues.

comment

An optional comment.

date

The date of file creation.

optimiser

Can be OLS or IRLS.

## Value

The function is called for its side effect.

Johannes Ranke