I want to pass a predefined but empty data.frame
to shiny/DT. Are there good practices?
What I found out is that
x <- data.frame(a=NA, b=NA)[!is.na(x$a),]
str(x)
produces the desired result.
'data.frame': 0 obs. of 2 variables:
$ a: logi
$ b: logi
But it looks clumsy. Is there a smarter way?