Re: [R] How to get rid of the index in result file

From: Jorge Ivan Velez <jorgeivanvelez_at_gmail.com>
Date: Thu, 19 May 2011 18:19:20 -0400

Hi Yighua,

Try

> m <- 2.35343
> m

[1] 2.35343
> cat(m)

2.35343

HTH,
Jorge

On Thu, May 19, 2011 at 2:35 PM, Hu, Yinghua <> wrote:

> Hi,
>
> I am running some function in Ubuntu command line and get some problem. I
> used some command like below
>
> $ R --slave -vanilla < my_infile > my_outfile
>
> The return should be one number in the my_outfile. In the my_infile, I call
> one extra function and it has code like "return x".
>
> However, in the output file my_outfile
>
> It shows
>
> [1] 2.35343
>
> How do I get only
>
> 2.35343
>
> I mean to get rid of "[1]" part. Thanks a lot!
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.
>

        [[alternative HTML version deleted]]



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. Received on Thu 19 May 2011 - 22:23:43 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 19 May 2011 - 22:30:08 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive