a <- 1:5
data_frame(a, b = a * 2)
data_frame(a, b = a * 2, c = 1)
data_frame(x = runif(10), y = x * 2)
# data_frame never coerces its inputs
str(data_frame(letters))
str(data_frame(x = list(diag(1), diag(2))))
# or munges column names
data_frame(`a + b` = 1:5)
# With the SE version, you give it a list of formulas/expressions
data_frame_(list(x = ~1:10, y = quote(x * 2)))
Run the code above in your browser using DataLab