Re: [R] ignore warning messages?

From: Hua Li <hualihua_at_yahoo.com>
Date: Sun, 06 Jul 2008 16:26:48 -0700 (PDT)


Thanks a lot, Henrique and Jorge!

> From: Jorge Ivan Velez <jorgeivanvelez_at_gmail.com>
> Subject: Re: [R] ignore warning messages?
> To: hualihua@yahoo.com
> Cc: "R-help" <r-help_at_r-project.org>
> Date: Tuesday, July 1, 2008, 1:12 PM
> Dear Hua,
>
> Try
>
> options(warn=-1)
> tt = "test"
> as.numeric(tt)
> [1] NA
>
>
> See also ?options for more info.
>
> HTH,
>
> Jorge
>
>
> On Tue, Jul 1, 2008 at 12:11 PM, Hua Li
> <hualihua_at_yahoo.com> wrote:
>
> > Hi All,
> >
> > I'm working with R and want to ignore the warning
> messages given, is there
> > a way to stop R from giving out warning messages any
> more?
> >
> > an example:
> >
> > tt = "test"
> > as.numeric(tt)
> >
> > would give me the following message:
> >
> > [1] NA
> > Warning message:
> > NAs introduced by coercion
> >
> > I decide to ignore the warning message for now and
> don't want it to show
> > any more, can someone help?
> >
> > Thanks!
> >
> >
> > Hua
> >
> > ______________________________________________
> > 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.
> >



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 Sun 06 Jul 2008 - 23:34:13 GMT

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 Mon 07 Jul 2008 - 00:31:42 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