Calculate MBSS Physical Habitat Index (PHI), Paul et al. 2003.
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")
)
Data frame of data to be processed. Must include the columns specified in the parameter 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")
Returns a dataframe of the original data with the metric scoring and PHI values.
No special libraries are needed for this function.
# 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")