Skip to content

Remove internal functions from exports #37

@judith-bourque

Description

@judith-bourque

To do

  • Add @noRd
  • Remove @keywords internal
  • Remove @export

Example

To respect the tidyverse style guide and prevent warning messages, document internal functions like this:

#' Drop last
#'
#' Drops the last element from a vector.
#'
#' @param x A vector object to be trimmed.
#' 
#' @noRd # Prevents an Rd from appearing

Notes

The following example will produce a warning message as @export makes the function available to users, but they don't have access to the .Rd file for documentation.

#' Drop last
#'
#' Drops the last element from a vector.
#'
#' @param x A vector object to be trimmed.
#' 
#' @noRd
#' @export

Adding @keywords internal can be appealing, but it's redundant as there's no .Rd file and the function isn't available to users as @export isn't used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions