options(warn = -1)

or

suppressWarnings(as.numeric("test"))

On Tue, Jul 1, 2008 at 1:11 PM, Hua Li <[EMAIL PROTECTED]> 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@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.
>



-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

        [[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