Hi Bienvenue,
Perhaps you should ask whether you really want to "sort it out". The
warning is telling you that you are converting the NA values to NA in
the returned numeric vector. I can't think of anything more sensible
to do with NA values. You may also have character strings that cannot
be converted into numbers, which will also generate NA values. Maybe a
little example will help us to understand:

charstr<-c("5","foot","2",NA,"eyes","of","blue")
as.numeric(charstr)
[1]  5 NA  2 NA NA NA NA

Jim

On Tue, Apr 9, 2019 at 9:16 PM bienvenidoz...@gmail.com
<bienvenidoz...@gmail.com> wrote:
>
> Hi,
>
> I am applyin function as.numeric to a vector having many values as NA
> and it is giving :
> Warning message:
> NAs introduced by coercion
>
> Can anyone help me to know how to remove this warning and sor it out?
>
> Thanks
> Bienvenue
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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