Hi,
   
  Thanks but I had already fixed that part.
  My problem is I am not getting a value for the maxcls or mincls:
  here is the code:
   
  > dset1<-cbind(AGE,BMI,DEATH)
> BMIGRP<-cut(BMI,breaks=c(14,20,25,57),right=TRUE)
> AGEGRP<-floor(AGE/10)-2
> dset<-cbind(AGEGRP,BMIGRP,DEATH)
> maxage<-max(dset[,1])
> minage<-min(dset[,1])
> maxcls<-max(dset[,2])
> maxcls
[1] NA
   
  After performing the cut function i get the different categories which are labelled as (a,b] by default. I wanted to change them to categories 1 ,2 and 3 respectively so that I get a value for maxcls and mincls.
   
  How do I change the 3 categories (14,20],(20,25],(25,57] to 1,2,3 respectively?
   
  Thanks,
  Anamika
  

"Richard M. Heiberger" <rmh@temple.edu> wrote:
  The lines
> #maxcls<-dset[,2]
> #mincls<-dset[,2]
which you have shown commented out select a full column.
You probably want the min and max of that column.

With your definitions, mincls:maxlcs has the same type of behavior as
(1:3):(1:3)


		
---------------------------------

	[[alternative HTML version deleted]]


