as_table: Coerce to table

View source: R/tables.R

as_tableR Documentation

Coerce to table

Description

Coerces an object to a table of the desired type.

Usage

as_table(x, type = data.frame(), stringsAsFactors = FALSE, ...)

Arguments

x

Object passed to the corresponding table coercion function.

type

Table type (passed to parse_table_type).

stringsAsFactors

Whether to convert all character columns to factors.

...

Arguments passed to the corresponding table coercion function.

See Also

Other Table functions: create_table, is_table, parse_table_type, parse_table, rbind_tables, remove_empty_dimensions, write_table

Examples

x <- list(a = 1, b = 1)
as_table(x)
## Not run: 
as_table(x, "data.table")
as_table(x, "tibble")
as_table(x, "tbl_dt")

## End(Not run)

columbia-glacier/cgr documentation built on Jan. 17, 2024, 2:42 p.m.