descriptive_statistics 1.1.3 → 1.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7cc6da30ab59d356996563cd474508c066bd3bd9
4
+ data.tar.gz: 93f9ea474a8965ee021c8d107df25b351f7894e3
5
+ SHA512:
6
+ metadata.gz: d55a7c4f16c5f7b016d5878dca98410ce1475400423e1466ac34d8a56bd92187b88b0f43151c15df988cd12235b9888e03840d5a7aafa8b0b2f39ef5d84e7453
7
+ data.tar.gz: 98c9b63afdbc28bc6f71197064c1f3b5e2c437df1164a78103779b5bdac8acd6a30ef0ab00502b23ba4d821f42bd8db2930d55eb990f48365f0e121295b62b9a
@@ -0,0 +1,6 @@
1
+ module DescriptiveStatistics
2
+ # percent of cases that are at or below a score
3
+ def percentile_rank(p)
4
+ return (sort.rindex{ |x| x <= p} + 1.0) / number * 100.0
5
+ end
6
+ end
@@ -6,6 +6,7 @@ require 'descriptive_statistics/mode.rb'
6
6
  require 'descriptive_statistics/variance.rb'
7
7
  require 'descriptive_statistics/standard_deviation.rb'
8
8
  require 'descriptive_statistics/percentile.rb'
9
+ require 'descriptive_statistics/percentile_rank.rb'
9
10
  require 'descriptive_statistics/range.rb'
10
11
  require 'descriptive_statistics/descriptive_statistics.rb'
11
12
 
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: descriptive_statistics
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
5
- prerelease:
4
+ version: 1.1.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Derrick Parkhurst
9
8
  - Gregory Brown
10
9
  - Daniel Farrell
11
10
  - Graham Malmgren
11
+ - Guy Shechter
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-02-24 00:00:00.000000000 Z
15
+ date: 2014-05-05 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
@@ -20,6 +20,7 @@ executables: []
20
20
  extensions: []
21
21
  extra_rdoc_files: []
22
22
  files:
23
+ - lib/descriptive_statistics.rb
23
24
  - lib/descriptive_statistics/descriptive_statistics.rb
24
25
  - lib/descriptive_statistics/enumerable_extension.rb
25
26
  - lib/descriptive_statistics/mean.rb
@@ -27,35 +28,34 @@ files:
27
28
  - lib/descriptive_statistics/mode.rb
28
29
  - lib/descriptive_statistics/number.rb
29
30
  - lib/descriptive_statistics/percentile.rb
31
+ - lib/descriptive_statistics/percentile_rank.rb
30
32
  - lib/descriptive_statistics/range.rb
31
33
  - lib/descriptive_statistics/safe.rb
32
34
  - lib/descriptive_statistics/standard_deviation.rb
33
35
  - lib/descriptive_statistics/sum.rb
34
36
  - lib/descriptive_statistics/variance.rb
35
- - lib/descriptive_statistics.rb
36
37
  homepage: https://github.com/thirtysixthspan/descriptive_statistics
37
38
  licenses:
38
39
  - MIT
40
+ metadata: {}
39
41
  post_install_message:
40
42
  rdoc_options: []
41
43
  require_paths:
42
44
  - lib
43
45
  required_ruby_version: !ruby/object:Gem::Requirement
44
- none: false
45
46
  requirements:
46
- - - ! '>='
47
+ - - ">="
47
48
  - !ruby/object:Gem::Version
48
49
  version: '0'
49
50
  required_rubygems_version: !ruby/object:Gem::Requirement
50
- none: false
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  requirements: []
56
56
  rubyforge_project:
57
- rubygems_version: 1.8.6
57
+ rubygems_version: 2.2.2
58
58
  signing_key:
59
- specification_version: 3
59
+ specification_version: 4
60
60
  summary: Descriptive Statistics
61
61
  test_files: []