Reading SQL data using bcpExport into a dataframe

,

I'm trying to read SQL data into R using the bcputility package. I'd just like some help figuring out to how read this data directly into a dataframe rather than into a file.

The function I'm trying to use is bcputility::bcpExport, reference here. The first argument - file - suggests that you can only read data into a file, but is there a way around this to read it into a dataframe instead? Perhaps creating a temp file, using that function to write data to that temp file, and then reading it from the temp file into a dataframe?

Just not sure what the best approach is. Any help / suggestions would be appreciated!