Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

use_tibble

Prepare to return a tibble


Description

Questioning lifecycle

Does minimum setup such that a tibble returned by your package is handled using the tibble method for generics like print() or [. Presumably you care about this if you've chosen to store and expose an object with class tbl_df. Specifically:

  • Check that the active package uses roxygen2

  • Add the tibble package to "Imports" in DESCRIPTION

  • Prepare the roxygen directive necessary to import at least one function from tibble:

    • If possible, the directive is inserted into existing package-level documentation, i.e. the roxygen snippet created by use_package_doc()

    • Otherwise, we issue advice on where the user should add the directive

This is necessary when your package returns a stored data object that has class tbl_df, but the package code does not make direct use of functions from the tibble package. If you do nothing, the tibble namespace is not necessarily loaded and your tibble may therefore be printed and subsetted like a base data.frame.

Usage

use_tibble()

Examples

## Not run: 
use_tibble()

## End(Not run)

usethis

Automate Package and Project Setup

v2.0.1
MIT + file LICENSE
Authors
Hadley Wickham [aut] (<https://orcid.org/0000-0003-4757-117X>), Jennifer Bryan [aut, cre] (<https://orcid.org/0000-0002-6983-2759>), RStudio [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.