0

I am using R to connect to an enterprise database via ODBC to extract data and do some analysis. The ODBC connection requires some 32 bit .dll files so I used the 32 bit version of R. However, I need to use R 64 bit for the analysis. I saved down the data in .rds files and tried to pull them back into an R 64 bit session, but I hit an error:

df <- do.call('rbind', lapply(list.files(path = "path", pattern = ".rds"), readRDS))

    Error in gzfile(file, "rb") : cannot open the connection
    In addition: Warning message:
    In gzfile(file, "rb") :
      cannot open compressed file 'filename.rds', probable reason 'No such file or directory'

I know I could save the data down to .csv and import it, but there will be a fair amount of formatting required as my data is over 200 columns wide with about every data type represented. I'm wondering if there's a simpler way to get data from a 32 bit session to a 64 bit session without the need for reformatting all the data.

Thanks for your help!

Mark Druffel
  • 629
  • 4
  • 10
  • 1
    That error seems more like a file-not-found error than a formatting error. Are you sure you have your working directory set properly? Maybe use `full.names = TRUE` with `list.files()`. If would be easier to help with some sort of [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – MrFlick Nov 09 '17 at 20:31
  • @MrFlick - I'm an idiot. I pulled the code right out of my 32 bit session where it worked so when it failed I made some assumptions. It was an copy/paste error in my setwd() line. Thanks so much for your help! – Mark Druffel Nov 09 '17 at 20:37

0 Answers0