descriptive_statistics 1.1.4 → 1.1.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7cc6da30ab59d356996563cd474508c066bd3bd9
4
- data.tar.gz: 93f9ea474a8965ee021c8d107df25b351f7894e3
3
+ metadata.gz: 36155709ef3b8ff6a6a38dd0335e3d0038fce127
4
+ data.tar.gz: 7aa6db66838780f71554af0917525ad2afb7d3a6
5
5
  SHA512:
6
- metadata.gz: d55a7c4f16c5f7b016d5878dca98410ce1475400423e1466ac34d8a56bd92187b88b0f43151c15df988cd12235b9888e03840d5a7aafa8b0b2f39ef5d84e7453
7
- data.tar.gz: 98c9b63afdbc28bc6f71197064c1f3b5e2c437df1164a78103779b5bdac8acd6a30ef0ab00502b23ba4d821f42bd8db2930d55eb990f48365f0e121295b62b9a
6
+ metadata.gz: 4cf3f0c2f98e7d526303c77e1a3242d7180461cbbbfeb4a868840c0acca50b875d14ce346a2f79aeb3f7aad950f7b78dd76053b715d067e02066042af5c933d0
7
+ data.tar.gz: 3571f09ba9a4d1b3b4c9ca60ee2c37e81225eaa1eb00e46f8d67d50d5cdc155f1b3bf771c507e84bb68679971ae1d4fc916a6dfb5152d286fa59dfcd24f1434d
@@ -1,6 +1,6 @@
1
1
  module DescriptiveStatistics
2
2
  # percent of cases that are at or below a score
3
3
  def percentile_rank(p)
4
- return (sort.rindex{ |x| x <= p} + 1.0) / number * 100.0
4
+ return (((sort.rindex{ |x| x <= p} || -1.0) + 1.0)) / number * 100.0
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descriptive_statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Derrick Parkhurst
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-05-05 00:00:00.000000000 Z
15
+ date: 2014-05-29 00:00:00.000000000 Z
16
16
  dependencies: []
17
17
  description: Adds descriptive statistics methods to Enumerable for use on collections
18
18
  email: derrick.parkhurst@gmail.com