Re: [R] Modifying Names from (x,y] into x

2009-02-26 Thread baptiste auguie
Hi, I got this problem once, and Prof. Ripley kindly added an example in the help page of ?cut, > > aaa <- c(1,2,3,4,5,2,3,4,5,6,7) > > ## one way to extract the breakpoints > labs <- levels(cut(aaa, 3)) > cbind(lower = as.numeric( sub("\\((.+),.*", "\\1", labs) ), > upper = as.numeric(

Re: [R] Modifying Names from (x,y] into x

2009-02-25 Thread Rolf Turner
On 26/02/2009, at 4:15 PM, David Winsemius wrote: dat <- c(1,2,3) names(dat) <- c(-2329, -1399, -669.4) dat -2329 -1399 -669.4 1 2 3 -- David Winsemius On Feb 25, 2009, at 9:55 PM, Gundala Viswanath wrote: Hi, I have the following data that looks like this: na

Re: [R] Modifying Names from (x,y] into x

2009-02-25 Thread David Winsemius
> dat <- c(1,2,3) > names(dat) <- c(-2329, -1399, -669.4) > dat -2329 -1399 -669.4 1 2 3 -- David Winsemius On Feb 25, 2009, at 9:55 PM, Gundala Viswanath wrote: Hi, I have the following data that looks like this: names(dat) [1] "(-2329,-2319]" "(-1399,-1389]"

[R] Modifying Names from (x,y] into x

2009-02-25 Thread Gundala Viswanath
Hi, I have the following data that looks like this: > names(dat) [1] "(-2329,-2319]" "(-1399,-1389]" "(-669.4,-659.4]" How can I modify those names into just this? [1] -2329 -1399 -669.4 - Gundala Viswanath Jakarta - Indonesia