jaySf jaySf - 3 years ago 196
R Question

Why can't I break an *.Rdata loading process?

It seems that R is not responding when trying to break loading an *.Rdata file with

load("*.Rdata")
. What is the reason and is there a way around?

I tried to break several file loading processes with different files and sizes. The only possibility then seems to be to terminate R. I am working with large file sizes whose loading time exceeds half an hour.

enter image description here

Answer Source

I think you're stuck. R doesn't make guarantees about whether low-level processes can be interrupted by the user. Low-level C code needs a call to R_CheckUserInterrupt() in order to "notice" a request from the user to break execution (see Wickham's advanced r book. You can see the low-level code for loading data if you like (although it may not be too helpful ...)

The only workaround I can think of (besides making sure that you really do want to load a particular data file) is to find ways to decompose your data into smaller chunks (and concatenate the chunks appropriately after reading them into R). If data reading is a really big bottleneck you could look at the high-performance computing task view section on out-of-memory data tools ...

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download