Skip to content

Commit

Permalink
fix CRAN requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
stemangiola committed Jul 6, 2020
1 parent 84532b8 commit a745d2d
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 24 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: tidygate
Type: Package
Title: Add Gate Information to Your Tibble
Version: 0.2.5
Version: 0.2.7
Authors@R:
c(person(given = "Stefano",
family = "Mangiola",
Expand Down
13 changes: 9 additions & 4 deletions R/functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,19 @@ gate_interactive <-
quo_is_symbol(.color) |
quo_is_symbol(.shape) |
quo_is_symbol(.size) & (.data %>% select(!!.size) %>% sapply(class) %in% c("numeric", "integer", "double"))
)
){
# Reset par on exit
opar <- par(no.readonly =TRUE)
on.exit(par(opar))

# Set the new par
par(
mar=c(5.1, 4.1, 4.1, 8.1),
xpd=TRUE,
tck = -.01 # Reduce tick length
)
}


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

# Reset par on exit
opar <- par(no.readonly =TRUE)
on.exit(par(opar))


# Return
gate_list %>%
Expand Down
12 changes: 8 additions & 4 deletions R/methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@
#'
#' @examples
#'
#' \dontrun{
#' \donttest{
#'
#' if(interactive()){
#'
#' tidygate::tidygate_data %>%
#' gate( .element = c(`ct 1`, `ct 2`), Dim1, Dim2 )
#'
#' }
#'
#' tidygate::tidygate_data %>%
#' gate( .element = c(`ct 1`, `ct 2`), Dim1, Dim2 )
#'
#' }
#'
#' library(magrittr)
Expand Down
12 changes: 8 additions & 4 deletions man/gate-methods.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 11 additions & 11 deletions tests/testthat/test-methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#
# test_that("gate dimensions", {
# library(dplyr)
# res =
# tidygate::tidygate_data %>%
# mutate(sh = factor(hierarchy)) %>%
# gate(
# .element = c(`ct 1`, `ct 2`),
# Dim1, Dim2,
# .color = hierarchy,
# .shape = sh,
# .size = hierarchy,
# how_many_gates = 2
# )
# res =
# tidygate::tidygate_data %>%
# mutate(sh = factor(hierarchy)) %>%
# gate(
# .element = c(`ct 1`, `ct 2`),
# Dim1, Dim2,
# .color = hierarchy,
# .shape = sh,
# .size = hierarchy,
# how_many_gates = 2
# )
#
# res2 =
# tidygate::tidygate_data %>%
Expand Down

0 comments on commit a745d2d

Please sign in to comment.