Is there any way to get one column of a dplyr tbl as a vector, from a tbl with a database back-end. It could either be data frame/table.
Below is my trial:
require(dplyr)
db <- src_sqlite(tempfile(), create = TRUE)
iris2 <- copy_to(db, iris)
iris2$Species
# NULL
I also tried the collect command.
collect(select(iris2, Species))[, 1]
# [1] "setosa" "setosa" "setosa" "setosa" etc.
But all this is a little bit clumsy!
Any help is appreciated!