A function to find the combinations of values of n parameters producing final state delta values fitting within confidence intervals of observations.
fit.final_space(
workdir,
obs_file_name,
sweep_space_digest_folders,
fit_name = NULL,
output_dir = NULL,
delta_reference_box = NaN,
excluded_boxes = NULL,
print_correlogram = FALSE,
print_lda = FALSE,
print_LS_surfaces = FALSE,
parameter_subsets = NULL,
custom_expressions = NULL,
save_outputs = FALSE,
export_fit_data = FALSE
)
Working directory of 0_ISOBXR_MASTER.xlsx master file,
of the dynamic sweep master file (e.g., 0_EXPLO_DYN_MASTER.xlsx)
and where output files will be stored if saved by user.
(character string)
Name of csv file containing observations with csv extension.
Stored in workdir. Example: "observations.csv"
Should contain the following columns:
BOX_ID: BOX ID (e.g., A, OCEAN...) as defined in isobxr master file.
delta.def definition of delta value, e.g., d18O
delta.ref BOX_ID of reservoir used as a reference.
obs.delta average observed delta numerical value
obs.CI confidence interval of delta value
obs.CI.def definition of confidence interval, e.g., 95
obs.file name of data source file
Name of sweep.final_nD digest directory.
Should start with "4_FINnD" and end with "_digest"
Name given to specific fit. If NULL, output are named after date and time of fit.
Destination directory for fit outputs. If NULL, outputs are stored in sweep_space_digest_folders directory. Default is NULL.
BOX ID of reference box, used to calculate difference
between any box delta and reference box delta. Default is NaN.
delta_reference_box should match at least one of the values declared
in the delta.ref column of observation csv file.
list of boxes to exclude from fit. Default is NULL.
If TRUE, includes correlograms to final report when applicable.
Default is FALSE.
If TRUE, includes linear discriminant analysis to final report
when applicable.
Default is FALSE.
If TRUE, includes surfaces of least squarred residuals
to final report when applicable.
Default is FALSE.
List of limits vectors for parameters to subset before fit.
For instance: list(swp.A.A_B = c(1, 1.00001))
to subset the swept fractionation factor from box A to B between 1 and 1.00001.
Vector of expressions to add to the list of fitted parameters.
For instance: c("m0.A/f.A_B") to add the ratios of mass of A over A to B flux
to the list of parameters.
If TRUE, saves all run outputs to local working directory (workdir).
By default, run outputs are stored in a temporary directory and erased if not saved.
Default is FALSE.
If TRUE, exports fitted data as csv and rds files.
A observation fit graphical report, in R session or exported as pdf, and a data report as R list or xlsx if required.