I am using the "write" function like so (R 3.0.1 on linux):

"wrt" <-
function()
{
    write(system("ls *"),file="")
}

When the files are listed to the screen with wrt(), there is a "0" character prepended to the output on the screen. Worse, when I remove the 'file=""' argument to "write", a file named "data" is created in my default directory, with a zero in it.

All I am trying to do is output the "ls" of files in my directory, without any extra characters or type-attribute information. Thanks for your help!

Thomas Grzybowski

______________________________________________
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