Displaying 1 result from an estimated 1 matches for "_assigned_".
Did you mean:
_assign_
2003 Oct 07
1
is.na(v)<-b (was: Re: Beginner's query - segmentation fault)
...-...,
pointed out, if you do
f(x) <- y
then afterwards you expect
f(x) == y
to be true. So let's try it:
> x <- c(1,NA,3)
> is.na(x) <- c(FALSE,FALSE,TRUE)
> x
[1] 1 NA NA
> is.na(x)
[1] FALSE TRUE TRUE
vvvvv
So I _assigned_ c(FALSE,FALSE,TRUE) to is.na(x),
but I _got_ c(FALSE,TRUE, TRUE)> instead.
^^^^^
That is not how a well behaved sinister function call should work,
and it's enough to scare someone off is.na()<- forever.
The obvious way to set elements of a variable to missing...