Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix API docs, fixes #72. Experiment with coveralls

  • Loading branch information...
commit f498a5ea1b130508fcb184cb6336d5cc67baa50d 1 parent e19b701
@tmcw authored
Showing with 18 additions and 5 deletions.
  1. +4 −0 .travis.yml
  2. +2 −2 API.md
  3. +8 −2 README.md
  4. +4 −1 package.json
View
4 .travis.yml
@@ -1,3 +1,7 @@
language: node_js
node_js:
- 0.10
+script:
+ - npm install
+ - npm test
+ - npm run cov
View
4 API.md
@@ -83,12 +83,12 @@ as one-dimensional arrays of more than one number each.
Produces [sample variance](http://mathworld.wolfram.com/SampleVariance.html)
of a single-dimensional array of numbers.
-### .sample_covariance(x)
+### .sample_covariance(a, b)
Produces [sample covariance](http://en.wikipedia.org/wiki/Sample_mean_and_sample_covariance)
of two single-dimensional arrays of numbers.
-### .sample_correlation(x)
+### .sample_correlation(a, b)
Produces [sample correlation](http://en.wikipedia.org/wiki/Correlation_and_dependence)
of two single-dimensional arrays of numbers.
View
10 README.md
@@ -33,6 +33,12 @@ Mean of a single-dimensional Array of numbers. _Also available as `.average(x)`_
Sum of a single-dimensional Array of numbers.
+### .mode(x)
+
+Returns the number that appears most frequently in a single-dimensional Array
+of numbers. If there are multiple modes, the one that appears last
+is returned.
+
### .variance(x)
[Variance](http://en.wikipedia.org/wiki/Variance) of a single-dimensional Array of numbers.
@@ -88,12 +94,12 @@ as one-dimensional arrays of more than one number each.
Produces [sample variance](http://mathworld.wolfram.com/SampleVariance.html)
of a single-dimensional array of numbers.
-### .sample_covariance(x)
+### .sample_covariance(a, b)
Produces [sample covariance](http://en.wikipedia.org/wiki/Sample_mean_and_sample_covariance)
of two single-dimensional arrays of numbers.
-### .sample_correlation(x)
+### .sample_correlation(a, b)
Produces [sample correlation](http://en.wikipedia.org/wiki/Correlation_and_dependence)
of two single-dimensional arrays of numbers.
View
5 package.json
@@ -11,10 +11,13 @@
"devDependencies": {
"mocha": "1.17.x",
"chai": "1.9.x",
- "jshint": "2.4.4"
+ "jshint": "2.4.4",
+ "mocha-lcov-reporter": "0.0.1",
+ "coveralls": "~2.10.0"
},
"scripts": {
"test": "jshint src/*.js && mocha -R spec test/spec",
+ "cov": "istanbul cover node_modules/.bin/_mocha --report lcovonly test/spec && coveralls < ./coverage/lcov.info",
"api": "node api.js"
},
"main": "src/simple_statistics.js",
Please sign in to comment.
Something went wrong with that request. Please try again.