Open all or selected columns in an interactive data viewer. Outside an interactive session, no viewer is opened.
Arguments
- .data
A data frame or tibble.
- ...
<
tidy-select> or <data-masking> Columns to select or compute withselect_or_transmute(). Existing columns, selection helpers, and named expressions can be mixed. Omit to browse all columns.
Value
The viewed data, invisibly, with its data-frame class preserved.
With no selection this is the input data; otherwise it is the result of
select_or_transmute(). The input is not modified.
Details
Viewing uses tibble::view(). Existing grouping and grouping-key retention
follow select_or_transmute(). Assign the invisible return value to keep the
viewed columns for subsequent analysis. Precompute expressions with side
effects before passing them to the selection interface.
See also
Other inspection functions:
codebook(),
misstable(),
names,
var_type(),
variables()
Examples
if (interactive()) {
browse(lifeexp)
browse(lifeexp, country:lexp)
browse(lifeexp, varlist("*p*"))
browse(lifeexp, country, gnppc_thousands = gnppc / 1000)
# Retain the viewed columns for the next pipeline stage.
selected <- browse(lifeexp, country, lexp, gnppc)
summ(selected, lexp, gnppc)
}