Estimate IPI scores for PHAB using station and physical habitat data

IPI(stations, phab, qa = TRUE, allerr = TRUE, log = FALSE)

Arguments

stations

data.frame of input station data

phab

data.frame of input physical habitat data

qa

logical indicating of quality assurance columns are appended to the output

allerr

logical indicating if all errors are returned or the first encountered

log

logical indicating if errors are printed to log in the workign directory, applies only if allerr = TRUE

Value

A results data.frame of IPI and metric scores, quality assurance results are returned if qa = TRUE (default)

Examples

IPI(stations, phab)
#> StationCode SampleDate SampleAgencyCode PHAB_SampleID IPI #> 1 105PS0107 9/14/2009 SWAMP 105PS0107_9/14/2009_SWAMP 1.16 #> 2 205PS0157 6/19/2012 SWAMP 205PS0157_6/19/2012_SWAMP 1.04 #> 3 305PS0057 6/16/2009 SWAMP 305PS0057_6/16/2009_SWAMP 0.79 #> 4 504PS0147 6/23/2008 SWAMP 504PS0147_6/23/2008_SWAMP 0.78 #> 5 632PS0007 7/23/2008 SWAMP 632PS0007_7/23/2008_SWAMP 1.10 #> 6 901PS0057 5/14/2008 SWAMP 901PS0057_5/14/2008_SWAMP 1.08 #> IPI_percentile Ev_FlowHab Ev_FlowHab_score H_AqHab H_AqHab_pred H_AqHab_score #> 1 0.90 0.85 0.89 1.59 1.11 1.00 #> 2 0.62 0.96 1.00 1.42 1.35 0.80 #> 3 0.04 0.50 0.51 1.32 1.42 0.70 #> 4 0.03 0.28 0.28 1.24 1.30 0.72 #> 5 0.79 0.90 0.95 1.51 1.41 0.82 #> 6 0.74 0.70 0.73 1.52 1.38 0.84 #> H_SubNat H_SubNat_score PCT_SAFN PCT_RC PCT_SAFN_pred PCT_SAFN_score XCMG #> 1 1.57 0.83 6 0 24.60 1.00 99 #> 2 1.41 0.74 51 2 22.06 0.40 131 #> 3 0.49 0.26 83 0 29.51 0.12 152 #> 4 0.98 0.52 1 0 34.38 1.00 55 #> 5 1.80 0.95 14 0 13.49 0.79 126 #> 6 1.80 0.95 40 3 34.46 0.69 122 #> XCMG_pred XCMG_score IPI_qa Ev_FlowHab_qa H_AqHab_qa H_SubNat_qa PCT_SAFN_qa #> 1 93.64 0.78 1.00 1 1 1 1 #> 2 104.72 0.90 1.00 1 1 1 1 #> 3 106.05 1.00 1.00 1 1 1 1 #> 4 95.41 0.51 1.00 1 1 1 1 #> 5 123.10 0.76 1.00 1 1 1 1 #> 6 102.16 0.86 0.95 1 1 1 1 #> XCMG_qa #> 1 1.00 #> 2 1.00 #> 3 1.00 #> 4 1.00 #> 5 1.00 #> 6 0.95