Skip to content

Commit be597a3

Browse files
committed
Apply minor updates to allow for changes in dependencies
* Modify tests for change to cli::cli_vec truncation * Add vec_ptype_abbr.haven_labelled_spss due to r-lib/vctrs#1571
1 parent 6e2903b commit be597a3

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ Config/Needs/website: tidyverse/tidytemplate
4343
Config/testthat/edition: 3
4444
Encoding: UTF-8
4545
Roxygen: list(markdown = TRUE)
46-
RoxygenNote: 7.2.1
46+
RoxygenNote: 7.2.3
4747
SystemRequirements: GNU make, C++11, zlib: zlib1g-dev (deb), zlib-devel
4848
(rpm)

NAMESPACE

+1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ S3method(vec_ptype2,haven_labelled_spss.integer)
5555
S3method(vec_ptype2,integer.haven_labelled)
5656
S3method(vec_ptype2,integer.haven_labelled_spss)
5757
S3method(vec_ptype_abbr,haven_labelled)
58+
S3method(vec_ptype_abbr,haven_labelled_spss)
5859
S3method(vec_ptype_full,haven_labelled)
5960
S3method(vec_ptype_full,haven_labelled_spss)
6061
S3method(zap_formats,data.frame)

R/labelled_spss.R

+5
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ vec_ptype_full.haven_labelled_spss <- function(x, ...) {
7373
paste0("labelled_spss<", vec_ptype_full(vec_data(x)), ">")
7474
}
7575

76+
#' @export
77+
vec_ptype_abbr.haven_labelled_spss <- function(x, ...) {
78+
paste0(vec_ptype_abbr(vec_data(x)), "+lbl")
79+
}
80+
7681
#' @export
7782
obj_print_footer.haven_labelled_spss <- function(x, ...) {
7883
na_values <- attr(x, "na_values")

tests/testthat/_snaps/labelled.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
`..1` and `..2` have conflicting value labels.
2222
i Labels for these values will be taken from `..1`.
23-
x Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
23+
x Values: 1, 2, 3, 4, 5, 6, 7, 8, ..., 11, and 12
2424

2525
# printed output is stable
2626

tests/testthat/_snaps/labelled_spss.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,5 +71,5 @@
7171

7272
`..1` and `..2` have conflicting value labels.
7373
i Labels for these values will be taken from `..1`.
74-
x Values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ...
74+
x Values: 1, 2, 3, 4, 5, 6, 7, 8, ..., 11, and 12
7575

tests/testthat/test-labelled.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ test_that("warn only for conflicting labels", {
178178
})
179179

180180
expect_snapshot_warning({
181-
x <- labelled(1:2, c(a = 1, b = 2, c = 3, d = 4, e = 5, f = 6, g = 7, h = 8, i = 9, j = 10, k = 11))
182-
y <- labelled(1:2, c(A = 1, B = 2, C = 3, D = 4, E = 5, F = 6, G = 7, H = 8, I = 9, J = 10, K = 11))
181+
x <- labelled(1:2, c(a = 1, b = 2, c = 3, d = 4, e = 5, f = 6, g = 7, h = 8, i = 9, j = 10, k = 11, l = 12))
182+
y <- labelled(1:2, c(A = 1, B = 2, C = 3, D = 4, E = 5, F = 6, G = 7, H = 8, I = 9, J = 10, K = 11, L = 12))
183183
c(x, y)
184184
})
185185
})

tests/testthat/test-labelled_spss.R

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ test_that("warn only for conflicting labels", {
187187
})
188188

189189
expect_snapshot_warning({
190-
x <- labelled_spss(1:2, c(a = 1, b = 2, c = 3, d = 4, e = 5, f = 6, g = 7, h = 8, i = 9, j = 10, k = 11))
191-
y <- labelled_spss(1:2, c(A = 1, B = 2, C = 3, D = 4, E = 5, F = 6, G = 7, H = 8, I = 9, J = 10, K = 11))
190+
x <- labelled_spss(1:2, c(a = 1, b = 2, c = 3, d = 4, e = 5, f = 6, g = 7, h = 8, i = 9, j = 10, k = 11, l = 12))
191+
y <- labelled_spss(1:2, c(A = 1, B = 2, C = 3, D = 4, E = 5, F = 6, G = 7, H = 8, I = 9, J = 10, K = 11, L = 12))
192192
c(x, y)
193193
})
194194
})

0 commit comments

Comments
 (0)