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