hi, Am Dienstag, 15. August 2017, 20:05:31 CEST schrieb Thomas Friedrichsmeier: > I'm a bit unsure, what would be the expected default behavior, though, > and whether we need anything special to support it for the activities > usecase. The general expectation would be that RKWard restores the > running session as close as possible, right? So what we'd need to do is > not simply quit without saving, but save to some standard location, > without asking, and restore that on the next run?
i'd suggest to remain as close as possible to the usual behavior of R. there you have three options: q() # meaning 'save="default"', will ask you whether workspace # should be saved; this is what RKWard currently does as well q("yes") # will quit R while automatically saving the workspace; # equivalent to what thomas was suggesting above q("no") # will quit R and discard the current workspace, no questions asked RKWard should just behave the same way, making it possible to set the 'save' argument in q()/quit(), which it currently doesn't use (you don't get an error if you set 'save' but in effect "default" remains hardcoded). if RKWard respected the use of 'save' like vanilla R, then even without changing the UI you could already customize the default closing behavior by putting something like formals(q)$save <- "no" # or "yes" in the options input field in RKWard's R backend configuration. to make this even more accessible, a dropdown menu could be added to that dialog, like "save current workspace when RKWard is closed" with options - "always save and restore automatically" # save="yes" - "always ask" # safe="default" - "never save and restore automatically" # save="no" and thereby set the formals like above, which i think is the most straight forward way of doing this. because you can then still overwrite the formals for the current session in a script or the console, which is what you find in forums when you search for this R problem online. viele grüße :: m.eik -- dipl. psych. meik michalke institut f"ur experimentelle psychologie abt. f"ur diagnostik und differentielle psychologie heinrich-heine-universit"at d-40204 d"usseldorf
signature.asc
Description: This is a digitally signed message part.