PHIcalc: PHI Calculation

View source: R/PHIcalc.R

PHIcalcR Documentation

PHI Calculation

Description

Calculate MBSS Physical Habitat Index (PHI), Paul et al. 2003.

Usage

PHIcalc(
  fun.df,
  fun.names = c("SampID", "Strata", "Area_acres", "Remote_020", "Shading_0100",
    "EpiSub_020", "BankStab_020", "AvgRipWid_m50max", "InStrmHab_020", "InstrmWood_Num",
    "RiffQual_020", "Embedd_0100", "Erosn_ExtR_075", "Erosn_ExtL_075", "Erosn_SevR_03",
    "Erosn_SevL_03", "RoadDist_m")
)

Arguments

fun.df

Data frame of data to be processed. Must include the columns specified in the parameter fun.names.

fun.names

Column names; Optional. Defaults = c("SampID", "Strata", "Area_acres", "Remote_020", "Shading_0100", "EpiSub_020", "BankStab_020", "AvgRipWid_m50max", "InStrmHab_020", "InstrmWood_Num", "RiffQual_020", "Embedd_0100", "Erosn_ExtR_075", "Erosn_ExtL_075", "Erosn_SevR_03", "Erosn_SevL_03", "RoadDist_m")

Details

No special libraries are needed for this function.

Value

Returns a dataframe of the original data with the metric scoring and PHI values.

Examples

# calculate PHI
PHI <- PHIcalc(MBSS.PHI)
# examine data
#View(PHI)
# Example Save file
#datetime <- format(Sys.time(),"%Y%m%d_%H%M%S")
#write.table(PHI,paste0("PHI_",datetime,".tab"),row.names=FALSE,sep="\t")

leppott/MBSStools documentation built on April 8, 2024, 9:57 p.m.