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.

badge(stage)

Arguments

stage

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

Value

An Rd expression describing the lifecycle stage.

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")}

Badges

  • \lifecycle{experimental}: Experimental lifecycle

  • \lifecycle{maturing}: Maturing lifecycle

  • \lifecycle{stable}: Stable lifecycle

  • \lifecycle{questioning}: Questioning lifecycle

  • \lifecycle{superseded}: Superseded lifecycle

  • \lifecycle{archived}: Archived lifecycle

  • \lifecycle{soft-deprecated}: Soft-deprecated lifecycle

  • \lifecycle{deprecated}: Deprecated lifecycle

  • \lifecycle{defunct}: Defunct lifecycle