Skip to content

Commit bee8f58

Browse files
committed
add news item and quantile type
1 parent 1593bf9 commit bee8f58

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: classInt
2-
Version: 0.4-7
3-
Date: 2022-06-10
2+
Version: 0.4-8
3+
Date: 2022-09-22
44
Title: Choose Univariate Class Intervals
55
Authors@R: c(
66
person("Roger", "Bivand", role=c("aut", "cre"), email="[email protected]", comment=c(ORCID="0000-0003-2392-6140")),

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## Version 0.4-8
2+
3+
- #18 and #38: `classIntervals()` has a new style `"box"`, where a box map is an augmented quartile map, with an additional lower and upper category. When there are lower outliers, then the starting point for the breaks is the minimum value, and the second break is the lower fence. When there are no lower outliers, then the starting point for the breaks will be the lower fence, and the second break is the minimum value (there will be no observations that fall in the interval between the lower fence and the minimum value) (@angela-li, @dieghernan).
4+
15
## Version 0.4-7
26

37
- A new helper function `classify_intervals()` is introduced to return a vector of class intervals of same length as input (@JosiahParry)

R/classInt.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,8 +357,9 @@ classIntervals <- function(var, n, style="quantile", rtimes=3, ..., intervalClos
357357

358358
dots <- list(...)
359359
iqr_mult <- ifelse(is.null(dots$iqr_mult), 1.5, dots$iqr_mult)
360+
qtype <- ifelse(is.null(dots$type), 7, dots$type)
360361

361-
qv <- unname(quantile(var))
362+
qv <- unname(quantile(var, type=qtype))
362363
iqr <- iqr_mult * (qv[4] - qv[2])
363364
upfence <- qv[4] + iqr
364365
lofence <- qv[2] - iqr

man/classIntervals.Rd

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,7 @@ classIntervals2shingle(x)
7070
7171
The "maximum" style uses the Maximum Breaks method of classification finding the k - 1 largest differences in \code{var}. The mean of the values that generated the largest splits is used as the interval boundary.
7272
73-
The "box" style generate 7 breaks (therefore 6 categories) based on a box-and-whisker plot. First and last categories
74-
includes the data values considered as outliers, and the four remaining categories are defined by the percentiles 25,
75-
50 and 75 of the data distribution. By default, the identification of outliers is based on the interquantile range
76-
(IQR), so values lower than percentile 25 - 1.5 * IQR or higher than percentile 75 + 1.5 * IQR are considered as outliers.
77-
The multiplier applied to the IQR \code{iqr_mult = 1.5} may be modified through \code{\dots}.
73+
The "box" style generates 7 breaks (therefore 6 categories) based on a box-and-whisker plot. First and last categories include the data values considered as outliers, and the four remaining categories are defined by the percentiles 25, 50 and 75 of the data distribution. By default, the identification of outliers is based on the interquantile range (IQR), so values lower than percentile 25 - 1.5 * IQR or higher than percentile 75 + 1.5 * IQR are considered as outliers. The multiplier applied to the IQR \code{iqr_mult = 1.5} may be modified through \code{\dots}. As in the \code{"quantile"} style, the \code{type=} argument may be used to choose the quantile algoritm (default 7).
7874
7975
}
8076

0 commit comments

Comments
 (0)