Description Usage Arguments Details Value Examples
View source: R/metrics.predicted.R
This function allows you to generate predicted metric scores based on data frame of stationIDs and site predictors. Generate predicted metric scores based on site location predictors in O/E (RandomForest) model. Output is table (stations by metrics).
1 | metrics.predicted(fun.df)
|
fun.df |
data frame of station IDs and site predictors. |
input data frame: head(NV.predictors) [1] "Sitecode" "ELVmax_WS" "PrdCond" "SQ_KM" "Tmax_WS" "Pmin_WS" [7] "WDmax_WS" "BFI_WS" "HYDR_WS" "Pmax_PT" "ELVmin_WS" "Tmax_PT" [13] "ELVcv_PT" "ELVmean_WS" "Pmax_WS" "Slope_WS"
Returns a data frame of stations and predicted metric values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Location of files.
path <- getwd()
setwd(path)
library("MMIcalcNV")
# Load Station Predictors
#prednew <- read.csv("predictors.20170215.csv")
prednew <- NV.predictors
head(prednew)
# Run function to get predicted metrics
new.metrics.pred <- metrics.predicted(prednew)
# Save the file
#write.csv(new.metrics.pred,"metrics_predicted.csv",row.names=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.