Skip to content

Commit 612fa56

Browse files
committed
mapped_discrete has resolution 1
1 parent 152d1d5 commit 612fa56

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

R/utilities-resolution.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@
1818
#' resolution(c(2, 10, 20, 50))
1919
#' resolution(c(2L, 10L, 20L, 50L))
2020
resolution <- function(x, zero = TRUE) {
21-
if (is.integer(x) || zero_range(range(x, na.rm = TRUE)))
21+
if (is.integer(x) || is_mapped_discrete(x) ||
22+
zero_range(range(x, na.rm = TRUE))) {
2223
return(1)
24+
}
2325

2426
x <- unique0(as.numeric(x))
2527
if (zero) {

0 commit comments

Comments
 (0)