On Fri, May 22, 2009 at 7:32 PM, wrote:
> Hi Kynn: this oddity is discussed in Patrick Burn's document called "The R
> Inferno". I don't recall the fix so I'm not sure if below is the same as
> what his book says to do but it seems to do what you want.
Wow, I sure hit the jackpot with this link
Hi Kynn: this oddityĆ is discussed in Patrick Burn's document called "The R
Inferno". I don't recall the fix so I'm not sure if below is the same as
what his book says to do but it seems to do what you want.
x <- list()
x[[1]] <- 2
x
length(x)
print(str(x))
x[2] <- list
ome close reading and experimentation to get it.
-- Bert Gunter
Genentech Nonclinical Statistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Kynn Jones
Sent: Friday, May 22, 2009 3:52 PM
To: r-help@r-project.org
Subject: [R] how to
I'm an experienced programmer, but learning R is making me lose the little
hair I have left...
> list(NULL)
[[1]]
NULL
> length(list(NULL))
[1] 1
> x <- list()
> x[[1]] <- NULL
> x
list()
> length(x)
[1] 0
>From the above experiment, it is clear that, although one can create a
one-element list
4 matches
Mail list logo