like:
>
>
>
> b[is.na(a)] = 43
>
>
>
> might be helpful. This line would put a 43 in b in the corresponding
> entry that was na in a.
>
>
>
> Good luck!.
>
>
>
>
>
>> Date: Sun, 14 Jun 2009 12:48:58 -0700
>> Fro
g entry
that was na in a.
Good luck!.
> Date: Sun, 14 Jun 2009 12:48:58 -0700
> From: gregori...@gmail.com
> To: r-help@r-project.org
> Subject: [R] if + is.na
>
>
> Hello!
> I wont to use a function is.na()
>
> I have two vectors:
> > a=c(1,NA,3,3,3)
&
On 15/06/2009, at 7:48 AM, Grześ wrote:
Hello!
I wont to use a function is.na()
I have two vectors:
a=c(1,NA,3,3,3)
b=c(0,0,0,0,0)
and when I use is.na function it's ok:
is.na(a)
[1] FALSE TRUE FALSE FALSE FALSE
but I would create sth like this:
for i in 1:length(a){
if (wsp[i] ==
Grześ wrote:
>
> Hello!
> I wont to use a function is.na()
>
> I have two vectors:
>> a=c(1,NA,3,3,3)
>> b=c(0,0,0,0,0)
> and when I use is.na function it's ok:
>> is.na(a)
> [1] FALSE TRUE FALSE FALSE FALSE
>
> but I would create sth like this:
>
> for i in 1:length(a){
> if (wsp[i]
Hello!
I wont to use a function is.na()
I have two vectors:
> a=c(1,NA,3,3,3)
> b=c(0,0,0,0,0)
and when I use is.na function it's ok:
> is.na(a)
[1] FALSE TRUE FALSE FALSE FALSE
but I would create sth like this:
for i in 1:length(a){
if (wsp[i] == is.na(a)) {b=43}
}
or like this
if(
5 matches
Mail list logo