Restore from Recently deleted
cellucid_history_journal_undo.RdUndo an edit of the history (a delete, a rename, a note, ...) from Recently deleted: exactly as it was when nothing changed it since, else as new objects ("X (restored)", removed steps applied again as a branch). Undoing a rename whose old name was taken since is refused, naming the name to use instead.
Arguments
- viewer
A viewer
cellucid_view()orcellucid_serve()returned.- entry
An entry of Recently deleted, by its id (history_summary counts them). Text. Required.
- tracker
A tracker by its name or its id (history_summary lists them); the tracker in use when left out. Text (at least 1 character). Left out unless given (the viewer then chooses as its own control does).
Value
A cellucid_action_request, at once and invisibly: the action is sent now, or when the viewer's channel opens.
cellucid_action_result(request) returns its outcome: a list of branch (The first branch a restore as new made of the steps it applied again), entry, journal (The entry the restore itself made (undoable)), report (The steps a restore as new applied again and what became of each (empty for an exact restore)), restored.
Details
The viewer's action history.journal.undo (History). It moves the viewer's history, as the person's Undo, Redo or a click on a step does: it makes no step of the history.
See also
cellucid_act() sends any action by its type, and cellucid_action_result()
collects its answer.
Examples
if (interactive() && requireNamespace("SeuratObject", quietly = TRUE)) {
data("pbmc_small", package = "SeuratObject")
viewer <- cellucid_view(SeuratObject::UpdateSeuratObject(pbmc_small))
request <- cellucid_history_journal_undo(viewer, entry = "j0")
print(request)
# cellucid_action_result(request) waits for its outcome.
cellucid_stop(viewer)
}