fix in stat_ecdf for Inf and NA values #784

Closed
wants to merge 1 commit into
from

2 participants

@JonasRauch

stat_ecdf fails when at least one value in data$x is NA or Inf:

  • for NA, the min/max become NA, leading to an error in seq
  • for Inf the min/max become infinite, and the finite end of the range is the only finite point in the result of the seq-call.

The fix removes NA and Inf for the purpose of computing the x-range. Note that all values are still included in the call to ecdf (which removes NAs, but handles Infs correctly).

@hadley
Owner

Could you please rebase/merge against master, re-document with the development version of roxygen2 (install_github("klutometis/roxygen) and resubmit?

@hadley hadley closed this Feb 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment