Answers for "Create empty DataFrame with only column names in R"

R
-1

Create empty DataFrame with only column names in R

# created data frame with 5 variables, and no rows
columns= c("id","names","address","phone","aadhar no") 
myData = data.frame(matrix(nrow = 0, 
                           ncol = length(columns))) 
colnames(myData) = columns
Posted by: Guest on July-27-2021

Code answers related to "Create empty DataFrame with only column names in R"

Browse Popular Code Answers by Language