# dev_desc.R
# Generate DESCRIPTION DCF file for package cargo.
# Packages ---------------------------------------------------------------------
library(desc)
# Optional: create a new empty file --------------------------------------------
file.create("DESCRIPTION")
# Generate and/or modify DESCRIPTION file --------------------------------------
# Read DESCRIPTION file.
desc <- description$new(file = "DESCRIPTION")
# Package type, name and title.
desc$set(Type = "Package",
Package = "cargo",
Title = "Data containers, schemas and prototypes")
# Version.
desc$set_version(package_version("0.0.1"))
# Authors.
desc$set_authors(
c(person(given = "Jean-Mathieu",
family = "Potvin",
email = "jean-mathieu_potvin@cooperators.ca",
role = c("cre", "aut"))))
# Description.
desc$set(
Description = "General low-level S4 containers for data, data schemas
and prototypes. These containers brings formality and
increased reliability at a negligible cost in resources.
They are easily customizable through a user-friendly API
and easily extendable to other S4 super-classes.")
# License.
desc$set(License = "MIT + file LICENSE")
# Website.
desc$add_urls("https://github.com/jeanmathieupotvin/cargo")
# Bug reports.
desc$set(BugReports = "https://github.com/jeanmathieupotvin/cargo/issues")
# Dependencies.
desc$set_dep("R", type = "Depends", version = ">= 3.6.0")
desc$set_dep("methods", type = "Imports", version = ">= 3.6.0")
desc$set_dep("data.table", type = "Imports", version = ">= 1.12.8")
desc$set_dep("rgdal", type = "Imports", version = "== 1.4-8")
desc$set_dep("sp", type = "Imports", version = "== 1.3-2")
desc$set_dep("utils", type = "Imports", version = ">= 3.6.0")
desc$set_dep("knitr", type = "Suggests", version = ">= 1.28")
desc$set_dep("rmarkdown", type = "Suggests", version = ">= 2.1")
desc$set_dep("testthat", type = "Suggests", version = ">= 2.3.2")
# Encoding.
desc$set(Encoding = "UTF-8")
# Turn on lazy evaluation of data.
desc$set(LazyData = "true")
# Specify some details for roxygen2.
desc$set(Roxygen = "list(markdown = TRUE)",
RoxygenNote = "7.1.0")
# Specify a vignette builder.
desc$set(VignetteBuilder = "knitr")
# Normalize fields before writing DESCRIPTION file.
desc$reformat_fields()
# Write DESCRIPTION file.
desc$write()
# Remove desc object.
rm(desc)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.