Question

I am using read.dbi.ffdf from the ETLUtils package to connect to an Oracle db and create an ffdf from the resulting query. I then save it to a local drive using save.ffdf. In the past I have closed R, and then used load.ffdf to successfully reload the ffdf.

However, something happened today that I am so far unable to recreate--the .RData file seems to have disappeared. When I try to load the ffdf, I get the following error:

## Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
## In addition: Warning message:
## In readChar(con, 5L, useBytes = TRUE) :
##   cannot open compressed file '.RData', probable reason 'No such file or directory'

I did not (knowingly) delete the .RData file, but sure enough it is gone from the directory where I saved the ffdf. All of the .ff files are still there though (~3GB in total). Since it took an hour to create the ffdf I'd like to be able to recreate it from the .ff files if possible.

Is there any way to load an ffdf from the .ff files if the .RData file is missing/corrupt? Or is there any way to recreate the .RData file manually? Any ideas how the .RData file might have been deleted?

Was it helpful?

Solution

No, you need the .RData file because it contains the virtual part indicating what was in the bytes of the ff files and also contains levels of factors in your ff files. So I'm afraid you will have to read in the data again and try not to delete the .RData files ;)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top