Skip to content

Commit

Permalink
Solves a "//" issue
Browse files Browse the repository at this point in the history
  • Loading branch information
vertesy committed Oct 17, 2017
1 parent 0dfac02 commit 22ae474
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MarkdownReports/R/MarkdownReports.R
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ setup_MarkdownReports <- function (OutDir = getwd(), scriptname = basename(OutDi

create_set_SubDir <- function (..., makeOutDirOrig=T, setDir=T) {
if ( ! substrRight(OutDir, 1) == "/" ) OutDir = paste0(OutDir, "/") # add '/' if necessary
NewOutDir = kollapse(OutDir, ..., "/", print = F)
NewOutDir = kollapse(OutDir, ..., print = F)
if ( ! substrRight(NewOutDir, 1) == "/" ) NewOutDir = paste0(NewOutDir, "/") # add '/' if necessary
NewOutDir = gsub(x=NewOutDir, pattern = '//', replacement = '/') # replace //
iprint("All files will be saved under 'NewOutDir': ", NewOutDir)
if (!exists(NewOutDir)) { dir.create(NewOutDir) }
Expand Down Expand Up @@ -152,7 +153,6 @@ wplot_save_this <- function (plotname = ww.autoPlotName(), ..., w = UnlessSpec("
if (mdlink) { ww.MarkDown_Img_Logger_PDF_and_PNG(fname_wo_ext = plotname) }
}


#' wplot
#'
#' Create and save scatter plots as .pdf, in "OutDir". If mdlink =T, it inserts a .pdf and a .png link in the markdown report, set by "path_of_report". The .png version is not created, only the link is put in place, not to overwrite previous versions. The .png version is not created, only the link is put in place. You can add 2D error bars around the dots, or add lines (ablines) to your plot, by setting "abline" argument to = F (no line, default), "h" (horizontal, further specified by a = y-offset), "v" (vertical, further specified by a = x-offset), "ab" (line with an angle, further specified by a = offset, b = slope).
Expand Down

0 comments on commit 22ae474

Please sign in to comment.