-
Notifications
You must be signed in to change notification settings - Fork 0
saving history in non-interactive mode #2
Copy link
Copy link
Open
Description
If using vtrackR in non-interactive mode saving vtags doesn't work, as it requires the function savehistory(..) to work, which only works in interactive mode. In non-interactive mode the function gethistory(..) dies with a message "Error in savehistory(file) : no history available to save". You could perhaps make this more informative by doing something like:
gethistory <- function() {
if ( ! interactive() )
stop('vtrackR requires an interactive Rsession. In BATCH mode you can force interactive mode using the commandline argument --interactive')
Return the history
Lines copied from function 'utils::history'.
By the way: isn't it a strange piece of code?
file1 <- tempfile("Rrawhist");
savehistory(file1);
rawhist <- readLines(file1);
unlink(file1);
return (rawhist);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels