Re: [R] cut2 error

2012-10-17 Thread David Winsemius
On Oct 17, 2012, at 12:42 PM, Charles Determan Jr wrote: To R users, I am trying to use cut2 function from the 'Hmisc' library. However, when I try and run the function on the following variable, I get an error message (displayed below). I suspect it is because of the NA but I have no

Re: [R] cut2 error

2012-10-17 Thread arun
98 99 96 NA cut2 <- function(x, g = 0){     cut(x, breaks = c(-Inf, seq(min(x), max(x), length.out = g))) } dat2<-dat1[!is.na(dat1)] cut2(dat2,g=4) A.K. From: Charles Determan Jr To: David Winsemius Cc: arun ; R help Sent: Wednesday, October 17, 2012 5

Re: [R] cut2 error

2012-10-17 Thread David Winsemius
> #[64] (98,99] (97,98] (97,98] (98,99] (98,99] (96,97] > (97,98] > #[71] (97,98] (97,98] (98,99] (97,98] (97,98] (97,98] > (98,99] > #[78] (97,98] (97,98] > #Levels: (-Inf,96] (96,97] (97,98] (98,99] > A.K. > > > > > - Original Message

Re: [R] cut2 error

2012-10-17 Thread Charles Determan Jr
9] (97,98] (97,98] (97,98] (97,98] >>> #[57] (97,98] (97,98] (97,98] (98,99] (98,99] (97,98] (98,99] >>> #[64] (98,99] (97,98] (97,98] (98,99] (98,99] (96,97] (97,98] >>> #[71] (97,98] (97,98] (98,99] (97,98] (97,98] (97,98] (98,99]

Re: [R] cut2 error

2012-10-17 Thread David Winsemius
ber 17, 2012 3:42 PM Subject: [R] cut2 error To R users, I am trying to use cut2 function from the 'Hmisc' library. However, when I try and run the function on the following variable, I get an error message (displayed below). I suspect it is because of the NA but I have no idea

Re: [R] cut2 error

2012-10-17 Thread Charles Determan Jr
99] (97,98] (97,98] (98,99] (98,99] (96,97] (97,98] > #[71] (97,98] (97,98] (98,99] (97,98] (97,98] (97,98] (98,99] > #[78] (97,98] (97,98] > #Levels: (-Inf,96] (96,97] (97,98] (98,99] > A.K. > > > > > - Original Message ----- > From: Charles De

Re: [R] cut2 error

2012-10-17 Thread arun
Determan Jr To: r-help@r-project.org Cc: Sent: Wednesday, October 17, 2012 3:42 PM Subject: [R] cut2 error To R users, I am trying to use cut2 function from the 'Hmisc' library.  However, when I try and run the function on the following variable, I get an error message (displayed below).  I s

[R] cut2 error

2012-10-17 Thread Charles Determan Jr
To R users, I am trying to use cut2 function from the 'Hmisc' library. However, when I try and run the function on the following variable, I get an error message (displayed below). I suspect it is because of the NA but I have no idea how to address the error. Many thanks to any insights. struc