knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of whpt
package is to predict WHPT scores, and assess them against
the expected class. This shows if a WHPT score is consistent with what is
expected at a given location.
Install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("ecodata1/whpt")
To run the prediction and check the consistency:
library(whpt) library(dplyr) whpts(demo_data)
To run a prediction, only need "GIS" and date variables (but you can have extra variables and doesn't matter what order or upper /lower case:)
# Select only the variables needed to run a prediction: data <- demo_data names(data) <- tolower(names(data)) data <- select( data, sample_id, date_taken, ngr, altitude, d_f_source, logaltbar, log_area, disch_cat, slope, chalk, clay, hardrock, limestone, peat) whpt_predict(data)
To run a prediction and then assess consistency:
predictions <- whpt_predict(demo_data) data <- bind_rows(demo_data, predictions) consistency(data)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.