Removes code from .Revhistory file used for managing Revticulate history. Clears all code by default, or last 'n' lines of code specifed by the user.

clearRev(n = NULL, silent = FALSE)

Arguments

n

integer - How many lines to remove. If n = NULL, all lines are removed.

silent

logical - If TRUE, output messages will be silenced. Default is FALSE.

Value

pseudoError: NULL. Message warning user that they attempted to erase more items from the Rev history than exist. message() is used instead of stop() so that clearRev() functions in repRev(). undoRev(n): NULL. Removes n number of lines from .Revhistory and cats the remaining history to the screen.

Examples

if (FALSE) {
clearRev() #Clear all Revticulate history
clearRev(n = 3) #Remove the last 3 lines of Revticulate history
}