Learn R Programming

packager (version 1.9.0)

sort_deps_in_desc: Sort Fields `Import`, `Depends` and `Suggests` DESCRIPTION

Description

Sort Fields `Import`, `Depends` and `Suggests` DESCRIPTION

Usage

sort_deps_in_desc(file)

Arguments

Value

NULL, but called for its side effect.

Examples

Run this code
# NOT RUN {
path <- file.path(tempdir(), "myFirstPackage")
usethis::create_package(path = path, rstudio = FALSE, open = FALSE)
withr::with_dir(path, usethis::use_package("withr"))
withr::with_dir(path, usethis::use_package("cleanr"))
desc::desc_get_deps(file.path(path, "DESCRIPTION"))
packager::sort_deps_in_desc(file.path(path, "DESCRIPTION"))
usethis::proj_set(NULL)
desc::desc_get_deps(file.path(path, "DESCRIPTION"))
unlink(path, recursive = TRUE)
# }

Run the code above in your browser using DataLab