Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

create a dataframe with column names in r

# This works well if you need an empty dataframe with n known columns
df <- data.frame(matrix(ncol = 3, nrow = 0))
x <- c("name", "age", "gender")
colnames(df) <- x
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #create #dataframe #column #names
ADD COMMENT
Topic
Name
3+1 =