Set up testing code.
sapply(c('tidycensus','here','tidyverse'), require, character.only=T) knitr::opts_knit$set(root.dir = here())
Set up testthat
usethis::use_testthat()
Actually test the package
devtools::test()
Check the package
devtools::check()
An example test
# by default, creates a vector. Note that each vector must be input manually divergence(alameda_wide$white,alameda_wide$hispanic,alameda_wide$asian,alameda_wide$black, totalPop = alameda_wide$total_pop) # if .sum==TRUE, creates a single number divergence(alameda_wide$white,alameda_wide$hispanic,alameda_wide$asian,alameda_wide$black, totalPop = alameda_wide$total_pop, .sum=T)
entropy(alameda_wide$white,alameda_wide$hispanic,alameda_wide$asian,alameda_wide$black, totalPop = alameda_wide$total_pop)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.