badge {lifecycle}R Documentation

Embed a lifecycle badge in documentation

Description

Call usethis::use_lifecycle() to import the badges in your package. Then use the lifecycle Rd macro to insert a lifecycle badges in your documentation, with the relevant lifecycle stage as argument:

\lifecycle{experimental}
\lifecycle{soft-deprecated}

The badge is displayed as image in the HTML version of the documentation and as text otherwise.

If the deprecated feature is a function, a good place for this badge is at the top of the topic description (if the deprecated function is documented with other functions, it might be a good idea to extract it in its own documentation topic to prevent confusion). If it is an argument, you can put the badge in the argument description.

Usage

badge(stage)

Arguments

stage

A lifecycle stage as a string, one of: "experimental", "maturing", "stable", "questioning", "archived", "soft-deprecated", "deprecated", "defunct".

Details

The lifecycle{} macro is made available by adding this field to DESCRIPTION (this is done automatically by usethis::use_lifecycle()):

RdMacros: lifecycle

The macro expands to this expression:

\Sexpr[results=rd, stage=render]{lifecycle::badge("experimental")}

Value

An Rd expression describing the lifecycle stage.

Badges


[Package lifecycle version 0.2.0 Index]