Dear Neal,

Although David's solution (putting the right parenthesis, which I had missed) 
has resolved the issue, I would like to try yours as well.

Could you please clarify the six elements:  c(-1e-8, 0, 0, 0, 0, 1e8)?

Thanks and regards,

Pradip


________________________________________
From: Neal H. Walfield [n...@walfield.org]
Sent: Monday, December 31, 2012 5:42 PM
To: Muhuri, Pradip (SAMHSA/CBHSQ)
Cc: R help
Subject: Re: [R] cut ()

At Mon, 31 Dec 2012 22:25:25 +0000,
Muhuri, Pradip (SAMHSA/CBHSQ) wrote:
> The issue is that, for Utah, I am getting an <NA> instead of (42,48.7] in the 
> ob_mrj_cat column.

The problem is likely due to comparisons of floating point numbers.
Try moving your lower and upper bounds out a tiny bit.  When I add

  c(-1e-8, 0, 0, 0, 0, 1e8)

to the result of quantile, I don't get any NAs.

Neal


______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to