This repository has been archived by the owner on May 4, 2019. It is now read-only.
Finalize API for basic statistics functions #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This branch restarts the process of adding missing functionality to our basic statistics functions for skipping
NA
values while calculating statistics. The code is quite repetitive and can be DRY'ed out in a future run.For now what I'd like to do is agree on what functionality these functions should offer. For now, I've taken every function I'm replacing and added a
skipna
keyword that allows one to skip overNA
values. Forskewness
andkurtosis
, this keyword has to be passed to the function that computes centers when they are not pre-specified, so the center is now also a keyword calledm
. (FWIW, I'm not a big fan of specifying centers that aren't the mean, so we might take that out. I'd argue it also doesn't belong in Base: neither R nor SciPy offer that functionality. I'm not sure why we do.)Things we're not doing that R does:
mean
,std
andvar
, R also offers the ability to trim out extreme data points.median
, R also offers the ability to use thelo
orhi
median, which is simply the lower or higher value in an array with an even number of elements, instead of their average.Unlike R, Julia Base expects that we will offer: