diffFlags: Diff Flags

View source: R/flagTools.r

diffFlagsR Documentation

Diff Flags

Description

Show differences in flag settings between two model runs.

Usage

diffFlags(par1, par2, all = TRUE, flaglist = NULL)

flagDiff(...)

Arguments

par1

MFCL flags from model run 1.

par2

MFCL flags from model run 2.

all

whether to include flags that are only specified in one of the model runs.

flaglist

optional filename to use instead of the built-in ‘flaglist.csv’ lookup table.

...

passed to diffFlags.

Details

The par1 and par2 objects can be any of the following:

  1. folder containing a ⁠par⁠ file

  2. filename of a ⁠par⁠ file

  3. MFCLPar object

  4. MFCLFlags object

  5. data.frame containing flag settings

Value

A data frame showing flag settings where par1 and par2 are different, along with a column showing the meaning of each flag.

Note

flagDiff is an older name of this function. To support legacy scripts, a call to the old function is simply forwarded to diffFlags.

See Also

This function calls flagMeaning to add the column showing the meaning of each flag.

diffFlagsStepwise shows differences in flag settings between stepwise model runs.

read.MFCLFlags reads flag settings from a ⁠par⁠ file.

Examples

data(par)
par1 <- par2 <- par

# Different flag value
flags(par2)[20,"value"] <- 12
diffFlags(par1, par2)

# When flag is specified in par1 but not in par2
flags(par1) <- rbind(flags(par1), c(-10269, 1, 1))
diffFlags(par1, par2)             # default is to show par2 as NA
diffFlags(par1, par2, all=FALSE)  # all=FALSE omits such comparisons


robscott3/FLR4MFCL documentation built on April 9, 2024, 3:31 p.m.