Learn R Programming

tbltools (version 0.0.2)

as_tbl: as_tbl

Description

See tibble::as_tibble for details.

Usage

as_tbl(x, row_names = FALSE)

Arguments

x

Data

row_names

Logical indicating whether to convert non-null row names into the first column.

Examples

Run this code
# NOT RUN {
## data with row names
d <- data.frame(x = rnorm(5), y = rnorm(5), row.names = letters[1:5])

## convert to tibble
as_tbl(d)

## convert to tibble and create row_names variable
as_tbl(d, row_names = TRUE)

# }

Run the code above in your browser using DataLab