DataSHIELD implementation of tibble::as_tibble. Currently only implemented for data frames and matrices.

asTibbleDS(tidy_expr, x, .rows, .name_repair, rownames)

Arguments

tidy_expr

Unused in present function.

x

A data frame or matrix.

.rows

The number of rows, useful to create a 0-column tibble or just as an additional check.

.name_repair

Treatment of problematic column names:

  • "minimal": No name repair or checks, beyond basic existence.

  • "unique": Make sure names are unique and not empty.

  • "check_unique": (default value), no name repair, but check they are unique.

  • "universal": Make the names unique and syntactic.

rownames

How to treat existing row names of a data frame or matrix:

  • `NULL`: remove row names. This is the default.

  • `NA`: keep row names.

  • A string: the name of a new column. Existing rownames are transferred into this column and the row.names attribute is deleted. No name repair is applied to the new column name, even if x already contains a column of that name.

Value

A tibble.