Re: [R] checkpointing

2021-12-13 Thread Avi Gross via R-help
Jeff, I am wondering what it even means to do what you say. In a compiled language, I can imagine wrapping up an executable along with some kind of run-time image (which may actually contain the parts of the executable that includes what has not run yet) and revive it elsewhere. But even there,

Re: [R] checkpointing

2021-12-13 Thread Richard O'Keefe
Use VirtualBox. You can take a 'snapshot' of a running virtual machine, either from the GUI or from the CLI (vboxmanage snapshot ...) and restore it later. This requires NO changes to R. Snapshots can be restored on another machine of the same kind with the same system software. VirtualBox is

Re: [R] checkpointing

2021-12-13 Thread Richard O'Keefe
I used to work on a Prolog implementation that did something similar. At any point you could explicitly save a snapshot of the current state and then from the operating system command line, resume it. This wasn't really for checkpointing. It was so that you could load up a customised environment,

Re: [R] checkpointing

2021-12-13 Thread Greg Minshall
Duncan, > R functions can call libraries written in other languages, and can > start processes, etc. R doesn't know everything going on in every > function call, and would have a lot of trouble saving it. indeed, that obvious fact hadn't occurred to me. i withdraw my contention. :) cheers,

Re: [R] checkpointing

2021-12-13 Thread Duncan Murdoch
On 13/12/2021 12:58 p.m., Greg Minshall wrote: Jeff, This sounds like an OS feature, not an R feature... certainly not a portable R feature. i'm not arguing for it, but this seems to me like something that could be a language feature. R functions can call libraries written in other

Re: [R] checkpointing

2021-12-13 Thread Greg Minshall
Jeff, > This sounds like an OS feature, not an R feature... certainly not a > portable R feature. i'm not arguing for it, but this seems to me like something that could be a language feature. cheers, Greg __ R-help@r-project.org mailing list -- To

Re: [R] checkpointing

2021-12-13 Thread Jeff Newmiller
This sounds like an OS feature, not an R feature... certainly not a portable R feature. On December 13, 2021 8:37:30 AM PST, Andy Jacobson via R-help wrote: >Has anyone ever considered what it would take to implement checkpointing in R, >so that long-running processes could be interrupted and

[R] checkpointing

2021-12-13 Thread Andy Jacobson via R-help
Has anyone ever considered what it would take to implement checkpointing in R, so that long-running processes could be interrupted and resumed later, from a different process or even a different machine? Thanks, Andy -- Andy Jacobson andy.jacob...@noaa.gov NOAA Global Monitoring Lab 325

Re: [R] subset data frame problem

2021-12-13 Thread Kai Yang via R-help
Thans Richard, it works well. --- Kai On Monday, December 13, 2021, 04:00:33 AM PST, Richard O'Keefe wrote: You want to DELETE rows satisfying the condition P & Q.The subset() function requires an expression saying whatyou want to RETAIN, so you need subset(PD, !(P & Q)). test <-

Re: [R] subset data frame problem

2021-12-13 Thread Richard O'Keefe
You want to DELETE rows satisfying the condition P & Q. The subset() function requires an expression saying what you want to RETAIN, so you need subset(PD, !(P & Q)). test <- subset(PD, !(Class == "1st" & Survived == "No")) By de Morgan's laws, !(P & Q) is the same as (!P) | (!Q) so you could