diff --git a/MarkdownReports/R/MarkdownReports.R b/MarkdownReports/R/MarkdownReports.R index 4e14ad6..951e7be 100644 --- a/MarkdownReports/R/MarkdownReports.R +++ b/MarkdownReports/R/MarkdownReports.R @@ -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) } @@ -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).