I am running the sm.density.compare function amd I am getting the following error:
 
my code is  > sm.density.compare(LBSTRESN,COHORT,xlab="Units = umol/L"subset = LBTEST=="Creatinine")
 
Error in if (from == to) rep.int(from, length.out) else as.vector(c(from,  : 
  missing value where TRUE/FALSE needed
 
I do not understand the error and I have had no help when searching the WEB or the R documentation.
 
I have tried the sample program in the R doc:y <- rnorm(100)
g <- rep(1:2, rep(50,2))
sm.density.compare(y, g, model="equal")
 and it works fine.   The only difference with my data is that I have some missing values that show as NA. I have checked that theseare numbered values by using the is.nan function. Any ideas? Thank You Jim L. 


	[[alternative HTML version deleted]]


