knitr::opts_chunk$set(echo = TRUE) suppressPackageStartupMessages(library(knitr)) suppressPackageStartupMessages(library(tools))
kable(data.summary)
spatialChecks <- 0 temporalChecks <- 0 taxonChecks <- 0 otherChecks <- 0 for (question in checks.records) { for (check in question$checks) { if (grepl("Location", check$check_category)) { spatialChecks = spatialChecks + 1 } else if (grepl("Event", check$check_category)) { temporalChecks = temporalChecks + 1 } else if (grepl("Taxon", check$check_category)) { taxonChecks = taxonChecks + 1 } else { otherChecks = otherChecks + 1 } } } Checks <- c( 'Taxonomical quality checks', 'Spatial quality checks', 'Temporal quality checks', 'Other quality checks', 'Total quality checks' ) Count <- c( taxonChecks, spatialChecks, temporalChecks, otherChecks, (taxonChecks + spatialChecks + temporalChecks + otherChecks) ) check.summary <- data.frame(Checks, Count) kable(check.summary)
index <- 1 checkCount <- 1 for (question in checks.records) { cat(paste('## ', index, '. ', question$question, '\n', sep = '')) cat('\n') cat(paste('Received Response: ', question$answer, '\n', sep = '')) cat('\n') checkIndex <- 1 for (check in question$checks) { cat(paste( '### ', 'Quality Check ', checkCount, ': ', names(question$checks[checkIndex]), sep = '' )) cat('\n') Type <- c('Description', 'Sample Pass Data', 'Sample Fail Data', 'Target DwC Field', 'Check Category', 'Flagged Records') Value <- c( check$description, check$sample_pass_data, check$sample_fail_data, check$target_dwc_field, toTitleCase(check$check_category), check$affected_data ) check.data.summary <- data.frame(Type, Value) print(kable(check.data.summary)) cat('\n') cat('\n') checkIndex <- checkIndex + 1 checkCount <- checkCount + 1 } index <- index + 1 }
Tomer Gueta, Vijay Barve, Thiloshon Nagarajah, Ashwin Agrawal and Carmel Yohay (2018). bdclean: Biodiversity Data Cleaning Workflow. R package version 0.0.6.
R Core Team (2012). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3-900051-07-0, URL http://www.R-project.org/
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.