[R] writing to the screen and extra "0"

Rui Barradas ruipbarradas at sapo.pt
Mon Jul 1 20:55:21 CEST 2013


Hello,

Try instead


list.files(pattern = "*")


Hope this helps,

Rui Barradas

Em 01-07-2013 19:23, Thomas Grzybowski escreveu:
>
> 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 at 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.



More information about the R-help mailing list