edit {utils} | R Documentation |
The work that the RStudio community was able to do to build a reliable text editor that was tightly coupled with the R environment was a game changer. For that reason, I want to start with the following caveat. If you are still getting started with R, I strongly suggest using RStudio. Basic Text Editor is a very simple application that reads and writes text files. It is particularly suited if you want to handle files in different encodings and character sets. See System Requirements. Basic Text Editor. Overview System Requirements Related.
Invoke a Text Editor
Perhaps you want a specialized text editor rather than a general purpose one as this will make a significant impact on designing and implementing a text editor. Take for instance you want a text editor to handle small files and fixed lengths of lines. Perhaps you want a text editor that minimizes memory usage while still performs adequately enough.
Description
Invoke a text editor on an R object.
Text Editor For Ruby
Usage
Arguments
name | a named object that you want to edit. If name is missingthen the file specified by |
file | a string naming the file to write the edited version to. |
title | a display name for the object being edited. |
editor | usually a character string naming (or giving the pathto) the text editor you want to use. On Unix the default is set fromthe environment variables EDITOR or VISUAL if either isset, otherwise
|
... | further arguments to be passed to or from methods. |
Details
edit
invokes the text editor specified by editor
withthe object 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 edit
to edit matrices and data frames on systems for whichdata.entry
is available.
Text Editor For R
It is important to realize that edit
does not change the objectcalled name
. Instead, a copy of name is made and it is thatcopy which is changed. Should you want the changes to apply to theobject name
you must assign the result of edit
toname
. (Try fix
if you want to make permanentchanges to an object.)
In the form edit(name)
,edit
deparses name
into a temporary file and invokes theeditor editor
on this file. Quitting from the editor causesfile
to be parsed and that value returned.Should an error occur in parsing, possibly due to incorrect syntax, novalue is returned. Calling edit()
, with no arguments, willresult in the temporary file being reopened for further editing.
Note that deparsing is not perfect, and the object recreated afterediting can differ in subtle ways from that deparsed: seedput
and .deparseOpts
. (The deparse optionsused are the same as the defaults for dump
.) Editing afunction will preserve its environment. Seeedit.data.frame
for further changes that can occur whenediting a data frame or matrix.
Currently only the internal editor in Windows makes use of thetitle
option; it displays the given name in the windowheader.
Note
The functions vi
, emacs
, pico
, xemacs
,xedit
rely on the corresponding editor being available andbeing on the path. This is system-dependent.
See Also
edit.data.frame
,data.entry
,fix
.
Examples
edit {utils} | R Documentation |
Invoke a Text Editor
Description
Invoke a text editor on an R object.
Usage
Arguments
name | a named object that you want to edit. If name is missingthen the file specified by |
file | a string naming the file to write the edited version to. |
title | a display name for the object being edited. |
editor | usually a character string naming (or giving the pathto) the text editor you want to use. On Unix the default is set fromthe environment variables EDITOR or VISUAL if either isset, otherwise
|
... | further arguments to be passed to or from methods. |
Details
edit
invokes the text editor specified by editor
withthe object 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 edit
to edit matrices and data frames on systems for whichdata.entry
is available.
Text Editor For Raspberry Pi
It is important to realize that edit
does not change the objectcalled name
. Instead, a copy of name is made and it is thatcopy which is changed. Should you want the changes to apply to theobject name
you must assign the result of edit
toname
. (Try fix
if you want to make permanentchanges to an object.)
In the form edit(name)
,edit
deparses name
into a temporary file and invokes theeditor editor
on this file. Quitting from the editor causesfile
to be parsed and that value returned.Should an error occur in parsing, possibly due to incorrect syntax, novalue is returned. Calling edit()
, with no arguments, willresult in the temporary file being reopened for further editing.
Note that deparsing is not perfect, and the object recreated afterediting can differ in subtle ways from that deparsed: seedput
and .deparseOpts
. (The deparse optionsused are the same as the defaults for dump
.) Editing afunction will preserve its environment. Seeedit.data.frame
for further changes that can occur whenediting a data frame or matrix.
Currently only the internal editor in Windows makes use of thetitle
option; it displays the given name in the windowheader.
Text Editor For Raspberry Pi
Note
The functions vi
, emacs
, pico
, xemacs
,xedit
rely on the corresponding editor being available andbeing on the path. This is system-dependent.
See Also
edit.data.frame
,data.entry
,fix
.