How to Create an Empty data frame in R
To create an empty data frame in R, “specify the column names and set the number of rows to 0 using the data.frame() function”. df <- data.frame(name = character(0), address = character(0), date = as.Date(character(0)), stringsAsFactors = FALSE) str(df) Output ‘data.frame’: 0 obs. of 3 variables: $ date: ‘Date’ num(0) $ file: chr $ user: … Read more