Skip to content

Commit

Permalink
version 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
djhunter authored and cran-robot committed Mar 11, 2020
1 parent 773a0f0 commit b51b3ed
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 7 deletions.
6 changes: 3 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: binsmooth
Type: Package
Title: Generate PDFs and CDFs from Binned Data
Version: 0.2.1
Version: 0.2.2
Author: David J. Hunter and McKalie Drown
Maintainer: Dave Hunter <dhunter@westmont.edu>
Description: Provides several methods for generating density functions
Expand All @@ -24,6 +24,6 @@ Imports: stats, pracma, ineq, triangle
LazyData: TRUE
NeedsCompilation: no
RoxygenNote: 6.1.1
Packaged: 2019-10-26 23:15:43 UTC; dhunter
Packaged: 2020-03-11 20:29:02 UTC; dhunter
Repository: CRAN
Date/Publication: 2019-10-27 05:10:02 UTC
Date/Publication: 2020-03-11 21:40:03 UTC
6 changes: 3 additions & 3 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
a6b463432f94a7a91101ac92555651b3 *DESCRIPTION
af62e49936a63002d49cc471ec80b9e3 *DESCRIPTION
11fcc18229d1926590c9d08f219c5132 *LICENSE
1e32880d420021b43570b02ebd8ee747 *NAMESPACE
1d691ad5cdd4da85d0033657b72af621 *NEWS
0eabaee5d525d20bdc8fb79cf973e392 *NEWS
0b08e66cda3f9eab71fa02616c2ae78a *R/gini.R
0ac28be09de5964160507a4c51196e62 *R/rsubbins.R
ed032de4e75cf4e9d7c7663b6fe200f7 *R/sb_percentiles.R
8d8df4bbcbb4409642e6465e75cbe314 *R/sb_sample.R
bc0b94f27b3c257f31e3cd997eb14089 *R/simcounty.R
280e85a77b49741afdacf41d983c4829 *R/splinebins.R
a2ae1ec325d5609a50f18c6e366a0b5e *R/splinebins.R
93e8b451cc3e732d3e003fac2adfe38b *R/stats_from_distribution.R
f3545a383dcc1d096ff36bf8d80f739f *R/stepbins.R
6644434bb4789dad83ffb90467f932fd *R/theil.R
Expand Down
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Changes in Version 0.2.2
========================

Update:

* Fixed bug in splinebins warning when median falls in the first bin.

Changes in Version 0.2.1
========================

Expand Down
6 changes: 5 additions & 1 deletion R/splinebins.R
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ splinebins <- function(bEdges, bCounts, m=NULL, numIterations=16, monoMethod=c("
}
median_bin <- which(cumsum(bCounts) > sum(bCounts)/2)[1]
med_fit <- splineInvCDF(0.5)
fitWarn <- (med_fit < bEdges[median_bin-1]) | (med_fit > bEdges[median_bin])
if (median_bin == 1) {
fitWarn <- (med_fit < 0) | (med_fit > bEdges[1])
} else {
fitWarn <- (med_fit < bEdges[median_bin-1]) | (med_fit > bEdges[median_bin])
}
if(fitWarn)
warning("Inaccurate fit detected. Proceed with caution.\n")
return(list(splinePDF=splinePDF,
Expand Down

0 comments on commit b51b3ed

Please sign in to comment.