Skip to content

Commit

Permalink
added greek encoding to pdf options and revert on exit so tests pass …
Browse files Browse the repository at this point in the history
…on debian environment
  • Loading branch information
brown-jason committed Oct 9, 2024
1 parent 8c0a084 commit 0fb2171
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ importFrom(grDevices,col2rgb)
importFrom(grDevices,colorRampPalette)
importFrom(grDevices,graphics.off)
importFrom(grDevices,pdf)
importFrom(grDevices,pdf.options)
importFrom(grDevices,rgb)
importFrom(graphics,abline)
importFrom(graphics,arrows)
Expand Down
6 changes: 6 additions & 0 deletions R/tcplPlot.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
#' @importFrom gridExtra marrangeGrob
#' @importFrom ggplot2 ggsave
#' @importFrom dplyr %>% all_of pull
#' @importFrom grDevices pdf.options
#' @export
#'
#' @examples
Expand All @@ -61,6 +62,11 @@ tcplPlot <- function(dat = NULL, type = "mc", fld = "m4id", val = NULL, compare.
#variable binding
conc_unit <- bmd <- resp <- compare.dat <- lvl <- compare <- NULL

#set pdf options
enc <- pdf.options()$encoding
pdf.options(encoding="CP1253.enc")
on.exit(pdf.options(encoding = enc))

# Validate vars based on some assumed properties
validated_vars <- tcplPlotValidate(type = type,flags = flags,output = output,multi = multi,verbose = verbose)
# take list of validated vars and add them to the function's environment
Expand Down

0 comments on commit 0fb2171

Please sign in to comment.