Skip to content
Prev 11830 / 29559 Next

classIntervals issue

On Thu, 26 May 2011, Carson Farmer wrote:

            
Class intervals must be relevant, no?

Reproducing:
Min.  1st Qu.   Median     Mean  3rd Qu.     Max.
     1.00    11.48   143.70  2277.00  1776.00 21970.00
style: fisher
   [1.000301,1745.2)   [1745.2,5520.098) [5520.098,10475.15) 
[10475.15,16236.95)
                2549                 375                 217 
147
[16236.95,21965.68]
                 121
Warning messages:
1: In factorial(n - 1) : value out of range in 'gammafn'
2: In factorial(n - k) : value out of range in 'gammafn'
[1] Inf
Warning message:
In factorial(3409 - 1) : value out of range in 'gammafn'
[1] Inf
Warning message:
In factorial(3409 - 5) : value out of range in 'gammafn'
function (x)
gamma(x + 1)
<environment: namespace:base>
[1] Inf
Warning message:
value out of range in 'gammafn'
function (x)
{
     n <- attr(x, "nobs")
     k <- length(x$brks) - 1
     (factorial(n - 1))/(factorial(n - k) * factorial(k - 1))
}
<environment: namespace:classInt>
[1] NaN
Warning messages:
1: In factorial(n - 1) : value out of range in 'gammafn'
2: In factorial(n - k) : value out of range in 'gammafn'

This is coming from the code in the print method that shows how many 
combinations of 3409 objects into 5 classes are possible, which is so 
large that the calls to factorial() and from there to gamma() fail. I can 
put in a check for n > 170 to suppress this information, because 
factorial(n-1) fails just above there.

Interesting point!

Roger