Load or save or display the commands history.
loadhistory(file = ".Rhistory") savehistory(file = ".Rhistory") history(max.show = 25, reverse = FALSE, pattern, ...) timestamp(stamp = date(), prefix = "##------ ", suffix = " ------##", quiet = FALSE)
- The name of the file in which to save the history, or from which to load it. The path is relative to the current working directory.
- The maximum number of lines to show.
Infwill give all of the currently available history.
- logical. If true, the lines are shown in reverse order. Note: this is not useful when there are continuation lines.
- A character string to be matched against the lines of the history
- Arguments to be passed to
grepwhen doing the matching.
- A value or vector of values to be written into the history.
- A prefix to apply to each line.
- A suffix to apply to each line.
TRUE, suppress printing timestamp to the console.
There are several history mechanisms available for the different R consoles, which work in similar but not identical ways. Other uses of R, in particular embedded uses, may have no history. variables: R_HISTSIZE controls the number of lines that are saved (default 512), and R_HISTFILE sets the filename used for the loading/saving of history if requested at the beginning/end of a session (but not the default for these functions). There is no limit on the number of lines of history retained during a session, so setting R_HISTSIZE to a large value has no penalty unless a large file is actually generated.
These variables are read at the time of saving, so can be altered within a session by the use of
history shows only unique matching lines if
pattern is supplied. The
timestamp function writes a timestamp (or other message) into the history and echos it to the console. On platforms that do not support a history mechanism (where the mechanism does not support timestamps) only the console message is printed.
Documentation reproduced from R 2.15.3. License: GPL-2.