library(testthat)
# Describe your package fusen::fill_description( fields = list( Title = "Manage database for GLA project", Description = "Create, populate and maintain a sqlite database containing all the data you need to populate a dashboard, run by the autodash package", `Authors@R` = c( person("Joe", "Heywood", email = "joe.heywood@london.gov.uk", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-1565-9313")), person(given = "GLA", role = "cph") ) ), overwrite = TRUE ) # Define License with use_*_license() usethis::use_mit_license("Joe Heywood")
#' Refresh the metadata #' #' #' @return #' Logical - TRUE for worked ok #' @export #' #' @examples refresh_metadata <- function() { TRUE }
# my_median(1:12) refresh_metadata()
test_that("refreshing metadata works", { })
#' Add data to database #' #' @param dat A data.frame with correct columns and at least one row #' #' @return #' Logical - TRUE for worked ok. #' @export #' #' @examples insert_db <- function(x, na.rm = TRUE) { TRUE }
dat <- data.frame() insert_db(dat)
test_that("insert_db works properly and show error if needed", { })
These will be included in the dev_history.R
file of your package, but won't be direct part of it.
# Run but keep eval=FALSE to avoid infinite loop # Execute in the console directly fusen::inflate(rmd = "dev/dev_history.Rmd")
You're one inflate from paper to box.
Build your package from this very Rmarkdown using fusen::inflate()
"DESCRIPTION"
file has been updated"R/"
directory"tests/testthat/"
directory"vignettes/"
directoryAdd the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.