Re: [R] Extract values from a named array

2008-04-07 Thread Gang Chen
Thanks a lot for the suggestions! Gang On 4/7/08, Uwe Ligges <[EMAIL PROTECTED]> wrote: > > > Gang Chen wrote: > > > Sorry for this dumb question. Suppose I have a named array ww defined as > > > > ww <- 1:5 > > names(ww) <- c("a", "b", "c", "d", "e") > > > > How can I extract the whole array of

Re: [R] Extract values from a named array

2008-04-07 Thread Uwe Ligges
Gang Chen wrote: > Sorry for this dumb question. Suppose I have a named array ww defined as > > ww <- 1:5 > names(ww) <- c("a", "b", "c", "d", "e") > > How can I extract the whole array of numbers without the names? > ww[1:5] does not work while ww[[1]] can only extract one number at a > time.

Re: [R] Extract values from a named array

2008-04-07 Thread Henrique Dallazuanna
Try: as.numeric(ww) On Mon, Apr 7, 2008 at 1:33 PM, Gang Chen <[EMAIL PROTECTED]> wrote: > Sorry for this dumb question. Suppose I have a named array ww defined as > > ww <- 1:5 > names(ww) <- c("a", "b", "c", "d", "e") > > How can I extract the whole array of numbers without the names? > ww[1:5

[R] Extract values from a named array

2008-04-07 Thread Gang Chen
Sorry for this dumb question. Suppose I have a named array ww defined as ww <- 1:5 names(ww) <- c("a", "b", "c", "d", "e") How can I extract the whole array of numbers without the names? ww[1:5] does not work while ww[[1]] can only extract one number at a time. Thanks, Gang