rownames: Convert row names back and forth between columns.

Description Usage Arguments Examples

Description

These functions provide a reasonably automatic way of preserving the row names of data frame during back-and-forth translation to a SQL table. By default, row names will be converted to an explicit column called "row_names", and any query returning a column called "row_names" will have those automatically set as row names.

Usage

1
2
3

Arguments

df

A data frame

row.names

Either TRUE, FALSE, NA or a string.

If TRUE, always translate row names to a column called "row_names". If FALSE, never translate row names. If NA, translate rownames only if they're a character vector.

A string is equivalent to TRUE, but allows you to override the default name.

For backward compatibility, NULL is equivalent to FALSE.

Examples

1
2
3
4
5
6
7
8
9

rstats-db/SQL documentation built on May 28, 2019, 3:35 a.m.