Mark Kimpel
2008-Jul-30 17:54 UTC
[R] setting editor environment variable EDITOR either when configuring R for installation or in .Rprofile
I'm running R on Linux and use emacs as my editor. When doing "edit(vignette(foo.vignette))" I would like to invoke emacs rather than the default vi. I am able to manually set this by editing $R_HOME/etc/Renviron but would like to avoid doing this with each install. I assume this can be accomplished with a flag to .configure or in .Rprofile but I can't find the syntax in R-admin. Editor is not listed as an environment variable in appendix B of that manual. So, help is appreciated as I've probably missed something. Mark -- Mark W. Kimpel MD ** Neuroinformatics ** Dept. of Psychiatry Indiana University School of Medicine 15032 Hunter Court, Westfield, IN 46074 (317) 490-5129 Work, & Mobile & VoiceMail (317) 663-0513 Home (no voice mail please) ****************************************************************** [[alternative HTML version deleted]]
Marc Schwartz
2008-Jul-30 18:04 UTC
[R] setting editor environment variable EDITOR either when configuring R for installation or in .Rprofile
on 07/30/2008 12:54 PM Mark Kimpel wrote:> I'm running R on Linux and use emacs as my editor. When doing > "edit(vignette(foo.vignette))" I would like to invoke emacs rather than the > default vi. I am able to manually set this by editing $R_HOME/etc/Renviron > but would like to avoid doing this with each install. I assume this can be > accomplished with a flag to .configure or in .Rprofile but I can't find the > syntax in R-admin. Editor is not listed as an environment variable in > appendix B of that manual. > > So, help is appreciated as I've probably missed something. > Mark >Mark, See ?options for 'editor'. This is also referenced in ?edit, where the default value for the 'editor' argument is getOption("editor"). Thus, in your .Rprofile, put: options(editor="emacs") HTH, Marc Schwartz