update_collate: Update Collate field in DESCRIPTION.

Description Usage Arguments Details Examples

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).

Usage

1
update_collate(base_path)

Arguments

base_path

Path to package directory.

Details

If there are no @include tags, roxygen2 will leave collate as is. This makes it easier to use roxygen2 with an existing collate directive, but if you remove all your @include tags, you'll need to also manually delete the collate field.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
#' `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")

## End(Not run)

klmr/roxydoxy documentation built on May 20, 2019, 4:09 p.m.