A function to read and inspect the isobxr master files and obtain a master formatted list.

read.isobxr_master(
  workdir,
  isobxr_master_file = "0_ISOBXR_MASTER",
  inspect = TRUE,
  export_rds = FALSE
)

Arguments

workdir

Working directory of isobxr excel master file and where output files will be stored if exported by user. (character string)

isobxr_master_file

Name of isobxr excel master file. (without file "xlsx" extension). Default is "0_ISOBXR_MASTER".

inspect

If TRUE, checks all inputs from isobxr master file for format and structure errors.
Default is TRUE.

export_rds

If TRUE, exports rds version of isobxr master file to working directory.
Default is FALSE.

Value

A formatted list of data frames containing constants, box, fluxes and fractionation coefficients descriptions.

Examples

read.isobxr_master(workdir = "/Users/username/Documents/1_ABC_tutorial",
                   isobxr_master_file = "0_ISOBXR_MASTER",
                   export_rds = FALSE,
                   inspect = TRUE)
#> $CONSTANTS
#>   ELEMENT RATIO_STANDARD NUMERATOR DENOMINATOR MASS_UNIT TIME_UNIT
#> 1      Ca        3.20297        44          42        mg         d
#> 
#> $BOXES
#>   BOX_ID INFINITE LAYOUT_X LAYOUT_Y
#> 1      A   FINITE        0       10
#> 2      B   FINITE       10       10
#> 3      D   FINITE        0        0
#> 4      C   FINITE       10        0
#> 5 SOURCE INFINITE        0       15
#> 6   SINK INFINITE       10       15
#> 
#> $FLUXES
#>    SIZE_or_FLUX   FROM   TO BOX_ID Fx1_ABC_bal Fx2_ABC_unbal Fx3_ABC_unbal
#> 1          FLUX      A    B    NaN       5e+01       5.0e+01       5.0e+01
#> 2          FLUX      A    C    NaN       5e+01       5.0e+01       5.0e+01
#> 3          FLUX      A    D    NaN       0e+00       0.0e+00       0.0e+00
#> 4          FLUX      B    A    NaN       6e+01       6.0e+01       6.0e+01
#> 5          FLUX      B    C    NaN       0e+00       0.0e+00       0.0e+00
#> 6          FLUX      B    D    NaN       0e+00       0.0e+00       0.0e+00
#> 7          FLUX      C    A    NaN       4e+01       4.1e+01       3.9e+01
#> 8          FLUX      C    B    NaN       1e+01       1.0e+01       1.0e+01
#> 9          FLUX      C    D    NaN       0e+00       0.0e+00       0.0e+00
#> 10         FLUX      D    A    NaN       0e+00       0.0e+00       0.0e+00
#> 11         FLUX      D    B    NaN       0e+00       0.0e+00       0.0e+00
#> 12         FLUX      D    C    NaN       0e+00       0.0e+00       0.0e+00
#> 13         FLUX SOURCE    A    NaN       0e+00       0.0e+00       0.0e+00
#> 14         FLUX      B SINK    NaN       0e+00       0.0e+00       0.0e+00
#> 15         FLUX      D SINK    NaN       0e+00       0.0e+00       0.0e+00
#> 16         SIZE    NaN  NaN      A       2e+03       2.0e+03       2.0e+03
#> 17         SIZE    NaN  NaN      B       2e+03       2.0e+03       2.0e+03
#> 18         SIZE    NaN  NaN      C       2e+03       2.0e+03       2.0e+03
#> 19         SIZE    NaN  NaN      D       2e+03       2.0e+03       2.0e+03
#> 20         SIZE    NaN  NaN SOURCE       1e+15       1.0e+15       1.0e+15
#> 21         SIZE    NaN  NaN   SINK       1e+15       1.0e+15       1.0e+15
#>    Fx4_ABCD_bal Fx5_ABCD_unbal Fx6_ABC_open_bal Fx7_ABC_open_unbal fluxes_FINnD
#> 1       5.0e+01        5.5e+01          5.5e+01            6.5e+01        0e+00
#> 2       5.0e+01        5.0e+01          5.0e+01            5.0e+01        9e+00
#> 3       0.0e+00        0.0e+00          0.0e+00            0.0e+00        5e+00
#> 4       6.0e+01        6.0e+01          6.0e+01            6.0e+01        0e+00
#> 5       0.0e+00        0.0e+00          0.0e+00            0.0e+00        0e+00
#> 6       0.0e+00        0.0e+00          0.0e+00            0.0e+00        0e+00
#> 7       4.0e+01        4.0e+01          4.0e+01            4.0e+01        0e+00
#> 8       0.0e+00        0.0e+00          1.0e+01            1.0e+01        1e+01
#> 9       1.5e+01        1.5e+01          0.0e+00            0.0e+00        0e+00
#> 10      0.0e+00        0.0e+00          0.0e+00            0.0e+00        4e+00
#> 11      1.0e+01        1.0e+01          0.0e+00            0.0e+00        0e+00
#> 12      5.0e+00        5.0e+00          0.0e+00            0.0e+00        1e+00
#> 13      0.0e+00        0.0e+00          5.0e+00            5.0e+00        1e+01
#> 14      0.0e+00        0.0e+00          5.0e+00            5.0e+00        1e+01
#> 15      0.0e+00        0.0e+00          0.0e+00            0.0e+00        0e+00
#> 16      2.0e+03        2.0e+03          2.0e+03            2.0e+03        1e+02
#> 17      2.0e+03        2.0e+03          2.0e+03            2.0e+03        1e+02
#> 18      2.0e+03        2.0e+03          2.0e+03            2.0e+03        1e+02
#> 19      2.0e+03        2.0e+03          2.0e+03            2.0e+03        1e+02
#> 20      1.0e+15        1.0e+15          1.0e+15            1.0e+15        1e+15
#> 21      1.0e+15        1.0e+15          1.0e+15            1.0e+15        1e+15
#> 
#> $COEFFS
#>   FROM TO a0    a1    a2     a3   a4    b1     b2 b3     b4 true_coeff_FINnD
#> 1    A  B  1 0.999 0.999 0.9990 1.00 0.999 0.9995  1 1.0005        1.0000000
#> 2    B  A  1 1.000 1.001 1.0010 1.00 1.000 1.0000  1 1.0000        1.0000000
#> 3    C  A  1 1.000 1.000 0.9997 1.00 1.000 1.0000  1 1.0000        1.0000000
#> 4    C  D  1 1.000 1.000 1.0000 0.99 1.000 1.0000  1 1.0000        1.0000000
#> 5    A  D  1 1.000 1.000 1.0000 1.00 1.000 1.0000  1 1.0000        0.9995001
#> 6    D  A  1 1.000 1.000 1.0000 1.00 1.000 1.0000  1 1.0000        1.0005001
#> 7    C  B  1 1.000 1.000 1.0000 1.00 1.000 1.0000  1 1.0000        1.0010005
#>   sweep_coeff_FINnD
#> 1            1.0000
#> 2            1.0000
#> 3            1.0000
#> 4            1.0000
#> 5            1.0000
#> 6            1.0005
#> 7            1.0000
#> 
#> $bx.groups
#> $bx.groups$all
#> [1] "A"      "B"      "C"      "D"      "SINK"   "SOURCE"
#> 
#> $bx.groups$all.n
#> [1] 6
#> 
#> $bx.groups$called_in_FLUXES
#> [1] "A"      "B"      "C"      "D"      "SOURCE" "SINK"  
#> 
#> $bx.groups$called_in_SIZES
#> [1] "A"      "B"      "C"      "D"      "SOURCE" "SINK"  
#> 
#> $bx.groups$called_in_COEFFS
#> [1] "A" "B" "C" "D"
#> 
#>