On Thu, 2005-10-20 at 11:34 +0200, Martin Maechler wrote:
> > "Marc" == Marc Schwartz <[EMAIL PROTECTED]>
> > on Wed, 19 Oct 2005 20:28:05 -0500 writes:
>.
>
> >> > In reviewing the Green Book on the top of page 143, it shows an
> example
> >> > in which the RH
> "Marc" == Marc Schwartz <[EMAIL PROTECTED]>
> on Wed, 19 Oct 2005 20:28:05 -0500 writes:
.
>> > In reviewing the Green Book on the top of page 143, it shows an example
>> > in which the RHS of the assignment are the indices into the LHS object
>> > which ar
On Wed, 2005-10-19 at 21:09 -0400, Gabor Grothendieck wrote:
> On 10/19/05, Marc Schwartz <[EMAIL PROTECTED]> wrote:
> > On Thu, 2005-10-20 at 01:13 +0100, Ted Harding wrote:
> > > On 19-Oct-05 Gabor Grothendieck wrote:
> > > > In the following the first element of xx should have
> > > > been set t
On 10/19/05, Marc Schwartz <[EMAIL PROTECTED]> wrote:
> On Thu, 2005-10-20 at 01:13 +0100, Ted Harding wrote:
> > On 19-Oct-05 Gabor Grothendieck wrote:
> > > In the following the first element of xx should have
> > > been set to 0 but remains NA. Any comments?
> > >
> > >> xx <- c(NA,1)
> > >> is
On Thu, 2005-10-20 at 01:13 +0100, Ted Harding wrote:
> On 19-Oct-05 Gabor Grothendieck wrote:
> > In the following the first element of xx should have
> > been set to 0 but remains NA. Any comments?
> >
> >> xx <- c(NA,1)
> >> is.na(xx) <- 0
> >> xx
> > [1] NA 1
> >> R.version.string # Windows
Hi,
It does seem to be working as advertised, but not particulary
intuitively. From ?is.na
The generic function 'is.na<-' sets elements to 'NA'
In fact:
xx <- c(NA, 1)
is.na(xx) <- 2
xx
[1] NA NA
or is.na(xx) <- 5
[1] NA 1 NA NA NA
Looks like this was introduced in 1.4.0; from NEWS:
o
On 19-Oct-05 Gabor Grothendieck wrote:
> In the following the first element of xx should have
> been set to 0 but remains NA. Any comments?
>
>> xx <- c(NA,1)
>> is.na(xx) <- 0
>> xx
> [1] NA 1
>> R.version.string # Windows XP
> [1] "R version 2.2.0, 2005-09-20"
I wonder, has it ever worked? I
In the following the first element of xx should have
been set to 0 but remains NA. Any comments?
> xx <- c(NA,1)
> is.na(xx) <- 0
> xx
[1] NA 1
> R.version.string # Windows XP
[1] "R version 2.2.0, 2005-09-20"
__
R-devel@r-project.org mailing list
htt