forked from r-lib/usethis
/
use_tibble.Rd
38 lines (36 loc) 路 1.46 KB
/
use_tibble.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tibble.R
\name{use_tibble}
\alias{use_tibble}
\title{Prepare to return a tibble}
\usage{
use_tibble()
}
\description{
\ifelse{html}{\out{<a href='https://www.tidyverse.org/lifecycle/#questioning'><img src='figures/lifecycle-questioning.svg' alt='Questioning lifecycle'></a>}}{\strong{Questioning}}
Does minimum setup such that a tibble returned by your package
is handled using the tibble method for generics like \code{print()} or \code{[}.
Presumably you care about this if you've chosen to store and expose an
object with class \code{tbl_df}. Specifically:
\itemize{
\item Check that the active package uses roxygen2
\item Add the tibble package to "Imports" in \code{DESCRIPTION}
\item Prepare the roxygen directive necessary to import at least one function
from tibble:
\itemize{
\item If possible, the directive is inserted into existing package-level
documentation, i.e. the roxygen snippet created by \code{\link[=use_package_doc]{use_package_doc()}}
\item 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 \code{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 \code{data.frame}.
}
\examples{
\dontrun{
use_tibble()
}
}