knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
THIS PACKAGE IS A WORK IN PROGRESS - DON'T USE IN PRODUCTION.
The goal of leafpacs
R package is to calculate river LEAFPACS classification.
Install the development version from GitHub with:
# install.packages("devtools") devtools::install_github("aquaMetrics/leafpacs", dependencies = TRUE)
Run classification:
library(leafpacs) data <- leafpacs(taxa_data) data[, c("sample_id", "eqr", "class", "high", "good", "moderate", "poor", "bad")]
Enter taxa and percentage cover categories and/or enter pre-calculated rmni
,
rfa_pc
etc values.
Dataframe structure:
locations_id
, date_taken
etc.question
, response
, and taxon.
slope
, dist_from_source
etc.The columns can be in any order. You can add as many columns as you like as you as you provide the required* columns.
Example data:
Demo data in package, *required columns required:
library(leafpacs)
taxa_data
Download web data including optional extra columns:
library(hera) data <- get_data(location_id = 92751) data #># A tibble: 6 × 21 #> location_id location_descri… sample_id date_taken season quality_element question response taxon latitude #> longitude #> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> #> <dbl> #> 1 http://environment.da… CAM - 92751 724530 2015-09-08 3 River Macrophy… percent… 8 Phra… 52.1 #> -0.0226 #> 2 http://environment.da… CAM - 92751 724530 2015-09-08 3 River Macrophy… percent… 7 Spar… 52.1 #> -0.0226 #> 3 http://environment.da… CAM - 92751 724530 2015-09-08 3 River Macrophy… n_rfg 0 NA 52.1 #> -0.0226 #> 4 http://environment.da… CAM - 92751 724530 2015-09-08 3 River Macrophy… rmhi 8.62 NA 52.1 #> -0.0226 #> 5 http://environment.da… CAM - 92751 724530 2015-09-08 3 River Macrophy… rmni 8 NA 52.1 #> -0.0226 #> 6 http://environment.da… CAM - 92751 724530 2015-09-08 3 River Macrophy… rn_a_ta… 0 NA 52.1 #> -0.0226 # … with 10 more variables: grid_reference <chr>, alkalinity <chr>, full_result_id <chr>, result.result_id <chr>, # result_id <chr>, northing <int>, easting <int>, dist_from_source <chr>, source_altitude <chr>, slope <chr>
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.