What is R DataFrame?

R code that builds a data.frame from character vectors.

Who uses it

Statistics and R notebooks.

Writing R DataFrame

stringsAsFactors is set to FALSE explicitly. It has defaulted to FALSE since R 4.0, but being explicit means the snippet behaves the same on older installs.

What it can hold

R data frame is source code. Columns are typed vectors and NA is a first-class value distinct from an empty string. A machine can read the table back out of it without guessing, which is what makes it safe to convert into and out of.

It keeps

It cannot express

What it looks like

Example R DataFrame
staff <- data.frame(
  id = c("007", "012", "104"),
  name = c("Halima Yusuf", "Jonah \"Jo\" Pryce", "Wei Chen"),
  role = c("Analyst, data", "Engineer", "Manager"),
  started = c("2024-03-15", "2025-11-02", "2023-06-30"),
  hours = c("38.5", "", "40")
  , stringsAsFactors = FALSE
)

Questions

How do I open R DataFrame files?

R DataFrame is written by Tablizer rather than read by it. Open the file in whichever tool the format belongs to.

Is R DataFrame a good format for sharing data?

It depends who is receiving it. Statistics and R notebooks. If the recipient is outside that group, a plain CSV travels further than anything else.

Convert something else to R DataFrame