I need to create a data.frame with no rows but specified column names and column types that is about to be filled later. As I want to have 1000 columns, defining columns one by one (as seen below) is not an option.
data.frame(a1 = character(), a2 = character(), ..., a1000 = character())
I was thinking that maybe paste function can be used to create a sequence of names, but the following doesn't work.
data.frame(paste('a', 1:1000, sep = '') = character())
Any ideas how it can be achieved?