From ff0b6f67a3ca67bf3aab8ae291f9eed30790d8e3 Mon Sep 17 00:00:00 2001 From: Brian Reilly Date: Wed, 11 Oct 2023 13:06:12 -0400 Subject: [PATCH] Update table-notes.R Option to allow printing full paths for source scripts on pmtables --- R/table-notes.R | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/R/table-notes.R b/R/table-notes.R index 8e30a021..e7e89a79 100644 --- a/R/table-notes.R +++ b/R/table-notes.R @@ -145,13 +145,21 @@ tpt_notes <- function(notes,x) { } form_file_notes <- function(r_file, r_file_label, output_file, - output_file_label, ...) { + output_file_label, full_path = FALSE, ...) { r_note <- output_note <- NULL if(is.character(r_file)) { - r_note <- paste0(r_file_label, basename(r_file)) + if(full_path) { + r_note <- paste0(r_file_label, r_file) + } else { + r_note <- paste0(r_file_label, basename(r_file)) + } } if(is.character(output_file)) { - output_note <- paste0(output_file_label, basename(output_file)) + if(full_path) { + output_note <- paste0(output_file_label, output_file) + } else { + output_note <- paste0(output_file_label, basename(output_file)) + } } c(r_note, output_note) }