Create Empty Dataframe R With Column Names

[Solved] Create Empty Dataframe R With Column Names | Matlab - Code Explorer | yomemimo.com
Question : create empty dataframe r with column names

Answered by : excited-echidna-5uwyez8fui2n

setNames(data.frame(matrix(ncol = 3, nrow = 0)), c("name", "age", "gender"))
#[1] name age gender
#<0 rows> (or 0-length row.names)

Source : https://stackoverflow.com/questions/32712301/create-empty-data-frame-with-column-names-by-assigning-a-string-vector | Last Update : Thu, 13 Jan 22

Answers related to create empty dataframe r with column names

Code Explorer Popular Question For Matlab