Press "Enter" to skip to content

R Data Frames And stringsAsFactors

John Mount recommends setting stringsAsFactors = FALSE for data frames in R:

R often uses a concept of factors to re-encode strings. This can be too early and too aggressive. Sometimes a string is just a string.

Tibbles have this set by default.  For an explanation as to why it defaults to TRUE for data frames, Roger Peng has the story.