Skip to content

Commit a745d2d

Browse files
committed
fix CRAN requirements
1 parent 84532b8 commit a745d2d

File tree

5 files changed

+37
-24
lines changed

5 files changed

+37
-24
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: tidygate
22
Type: Package
33
Title: Add Gate Information to Your Tibble
4-
Version: 0.2.5
4+
Version: 0.2.7
55
Authors@R:
66
c(person(given = "Stefano",
77
family = "Mangiola",

R/functions.R

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,19 @@ gate_interactive <-
349349
quo_is_symbol(.color) |
350350
quo_is_symbol(.shape) |
351351
quo_is_symbol(.size) & (.data %>% select(!!.size) %>% sapply(class) %in% c("numeric", "integer", "double"))
352-
)
352+
){
353+
# Reset par on exit
354+
opar <- par(no.readonly =TRUE)
355+
on.exit(par(opar))
356+
357+
# Set the new par
353358
par(
354359
mar=c(5.1, 4.1, 4.1, 8.1),
355360
xpd=TRUE,
356361
tck = -.01 # Reduce tick length
357362
)
363+
}
364+
358365

359366
# Plot
360367
my_df %>% pretty_plot(
@@ -367,9 +374,7 @@ gate_interactive <-
367374
# Loop over gates # Variable needed for recalling the attributes lates
368375
gate_list = map(1:how_many_gates, ~ my_matrix %>% gatepoints::fhs(mark = TRUE, ...))
369376

370-
# Reset par on exit
371-
opar <- par(no.readonly =TRUE)
372-
on.exit(par(opar))
377+
373378

374379
# Return
375380
gate_list %>%

R/methods.R

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,15 @@
3030
#'
3131
#' @examples
3232
#'
33-
#' \dontrun{
33+
#' \donttest{
34+
#'
35+
#' if(interactive()){
36+
#'
37+
#' tidygate::tidygate_data %>%
38+
#' gate( .element = c(`ct 1`, `ct 2`), Dim1, Dim2 )
39+
#'
40+
#' }
3441
#'
35-
#' tidygate::tidygate_data %>%
36-
#' gate( .element = c(`ct 1`, `ct 2`), Dim1, Dim2 )
37-
#'
3842
#' }
3943
#'
4044
#' library(magrittr)

man/gate-methods.Rd

Lines changed: 8 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/testthat/test-methods.R

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22
#
33
# test_that("gate dimensions", {
44
# library(dplyr)
5-
# res =
6-
# tidygate::tidygate_data %>%
7-
# mutate(sh = factor(hierarchy)) %>%
8-
# gate(
9-
# .element = c(`ct 1`, `ct 2`),
10-
# Dim1, Dim2,
11-
# .color = hierarchy,
12-
# .shape = sh,
13-
# .size = hierarchy,
14-
# how_many_gates = 2
15-
# )
5+
# res =
6+
# tidygate::tidygate_data %>%
7+
# mutate(sh = factor(hierarchy)) %>%
8+
# gate(
9+
# .element = c(`ct 1`, `ct 2`),
10+
# Dim1, Dim2,
11+
# .color = hierarchy,
12+
# .shape = sh,
13+
# .size = hierarchy,
14+
# how_many_gates = 2
15+
# )
1616
#
1717
# res2 =
1818
# tidygate::tidygate_data %>%

0 commit comments

Comments
 (0)