Skip to content

Preserve order of @example and @examples #868

@HenrikBengtsson

Description

@HenrikBengtsson

I'd like to propose a new tag @import that takes a file as input. It reads the content of that file and injects it as is.

One use case would be to allow for something like (just a toy example):

#' @examples
#' \dontshow{
#' oopts <- options()
#' }
#' @import incl/my_fcn.R
#' \dontshow{
#' options(oops)
#' }

The above allows you to keep a standalone, syntax-valid file incl/my_fcn.R that can be source():ed while still having additional Rd markup in the example() code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancementrd ✍️

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions