[Rd] "utils::file.edit" does not understand "editor" with additional arguments

Randy Lai r@ndy@c@@l@i @ending from gm@il@com
Tue Aug 28 21:07:36 CEST 2018


I am using Sublime Text as my editor. If I run `subl -n .Rprofile` in bash, a file would be opened in a new window.

Back in R, if I run this

> file.edit(".Rprofile", editor="'subl -n'")
sh: 'subl -n': command not found
Warning message:
error in running command

However, the interesting bit happens when I run

edit(1:10, editor="'subl -n’")

It does open Sublime Text. It seems that `file.edit` and `edit` are behaving differently when “editor” has additional arguments.

Randy

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20180828/28f66613/attachment.sig>


More information about the R-devel mailing list