Learn R Programming

roxygen2 (version 3.1.0)

update_collate: Update Collate field in DESCRIPTION.

Description

Topologically sort R files and record in Collate field. The topological sort is based on the @include tag, which should specify the filenames (space separated) that should be loaded before the current file - these are typically necessary if you're using S4 or RC classes (because super classes must be defined before subclasses). If there are no @include tags Collate will be left blank, indicating that the order of loading does not matter.

Usage

update_collate(base_path)

Arguments

base_path
Path to package directory

Details

This is not a roclet because roclets need the values of objects in a package, and those values can not be generated unless you've sourced the files, and you can't source the files unless you know the correct order.

Examples

Run this code
#' `example-a.R', `example-b.R' and `example-c.R' reside
#' in the `example' directory, with dependencies
#' a -> {b, c}. This is `example-a.R'.
#' @include example-b.R
#' @include example-c.R
NULL

## Not run: ------------------------------------
#   update_collate("my_package")
## ---------------------------------------------

Run the code above in your browser using DataLab