Since installing R 2.14.0 on my Mac (a Mac Pro running 10.6.8) an issue has 
arisen when using the vi editor in conjunction with the edit() command. More 
specifically, commented lines disappear from edited functions when using 
[functionname.R] <- edit().

That is, if you have created a function called “test.func” as such:

function ()
{
# This is a test
ex _ 4
    duh <- seq(1, 10)
    fuh <- seq(11, 20)
    plot(duh, fuh)
}

you will of course get an error message:

Error in edit(name, file, title, editor) :
  unexpected input occurred on line 4
 use a command like
 x <- edit()
 to recover

When using the “x <- edit” (or in this case, test.func <- edit()), the comment 
“This is a test” will disappear from the edited function.

Does anyone have any insight into this problem?

Thanks,
Jeff Freedman

_____________________________
Jeff Freedman
Lead Research Scientist
AWS Truepower, LLC
463 New Karner Road
Albany, NY 12205
phone: 518-213-0044 (x1049)
fax: 518-640-6897


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to