Invoke a Text Editor
Invoke a text editor on an R object.
1 2 3 4 5 6 7 8 9
a named object that you want to edit. If name is missing
then the file specified by
a string naming the file to write the edited version to.
a display name for the object being edited.
usually a string naming the text editor you want to use.
On Unix the default is set from the environment variables
EDITOR or VISUAL if either is set, otherwise
further arguments to be passed to or from methods.
edit invokes the text editor specified by
name to be edited. It is a generic function,
currently with a default method and one for data frames and matrices.
data.entry can be used to edit data, and is used by
to edit matrices and data frames on systems for which
data.entry is available.
It is important to realize that
edit does not change the object
name. Instead, a copy of name is made and it is that
copy which is changed. Should you want the changes to apply to the
name you must assign the result of
fix if you want to make permanent
changes to an object.)
In the form
name into a temporary file and invokes the
editor on this file. Quitting from the editor causes
file to be parsed and that value returned.
Should an error occur in parsing, possibly due to incorrect syntax, no
value is returned. Calling
edit(), with no arguments, will
result in the temporary file being reopened for further editing.
Note that deparsing is not perfect, and the object recreated after
editing can differ in subtle ways from that deparsed: see
.deparseOpts. (The deparse options
used are the same as the defaults for
dump.) Editing a
function will preserve its environment. See
edit.data.frame for further changes that can occur when
editing a data frame or matrix.
Currently only the internal editor in Windows makes use of the
title option; it displays the given name in the window
xedit rely on the corresponding editor being available and
being on the path. This is system-dependent.
1 2 3 4 5 6 7 8
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.