diff --git a/README.md b/README.md index 28f178289850df2992a256b42825d0e73dfad751..f8a249ae75fc4c604347218fd428e701de67c64f 100644 --- a/README.md +++ b/README.md @@ -170,9 +170,14 @@ Gitlab developers ## WHAT'S NEW IN +### v10.9.0 + +1) no.overwrite argument of fun_report() replaced by overwrite + + ### v10.8.3 -1) fun.test() and fun.slide() debbuged for cute.path +1) fun_test() and fun_slide() debbuged for cute.path ### v10.8.2 @@ -184,7 +189,7 @@ Gitlab developers 1) fun_check() and fun_info() readded for practical purposes but must not be changed. See the cute package for that -2) cute.path parameter improved for fun.test() and fun.slide() +2) cute.path parameter improved for fun_test() and fun_slide() ### v10.8.0 diff --git a/check/TODO.txt b/check/TODO.txt index 8fe4f7ca6d21dd9180fd9ba4711d085b4ad5eb33..84b0d88eb82188b788aa924f425384a9a308d251 100644 --- a/check/TODO.txt +++ b/check/TODO.txt @@ -1,4 +1,9 @@ +See bitbucket to make the wiki pages. Example: +https://immcantation.readthedocs.io/en/stable/docker/intro.html +https://bitbucket.org/kleinstein/immcantation/src/c79aba1f73470e3acbefde8cdb19f27d28fc9752/docs/docker/intro.rst?mode=view + + 20210616 diff --git a/cute_little_R_functions.R b/cute_little_R_functions.R index 91196fa11f9d2782ecc7d3e8bfcbb29df6c2ad5a..135aa7000fe704a837f439bde448d12e29b5a8e8 100644 --- a/cute_little_R_functions.R +++ b/cute_little_R_functions.R @@ -8740,7 +8740,7 @@ fun_report <- function( data, output = "results.txt", path = "C:/Users/Gael/Desktop/", - no.overwrite = TRUE, + overwrite = FALSE, rownames.kept = FALSE, vector.cat = FALSE, noquote = TRUE, @@ -8752,7 +8752,7 @@ fun_report <- function( # data: object to print in the output file. If NULL, nothing is done, with no warning # output: name of the output file # path: location of the output file - # no.overwrite: (logical) if output file already exists, defines if the printing is appended (default TRUE) or if the output file content is erased before printing (FALSE) + # overwrite: (logical) if output file already exists, defines if the printing is appended (default FALSE) or if the output file content is erased before printing (TRUE) # rownames.kept: (logical) defines whether row names have to be removed or not in small tables (less than length.rows rows) # vector.cat (logical). If TRUE print a vector of length > 1 using cat() instead of capture.output(). Otherwise (default FALSE) the opposite # noquote: (logical). If TRUE no quote are present for the characters @@ -8765,9 +8765,9 @@ fun_report <- function( # fun_check() # EXAMPLES # fun_report() - # fun_report(data = 1:3, output = "results.txt", path = "C:/Users/Gael/Desktop", no.overwrite = TRUE, rownames.kept = FALSE, vector.cat = FALSE, noquote = FALSE, sep = 2) + # fun_report(data = 1:3, output = "results.txt", path = "C:/Users/Gael/Desktop", overwrite = TRUE, rownames.kept = FALSE, vector.cat = FALSE, noquote = FALSE, sep = 2) # DEBUGGING - # data = 1:3 ; output = "results.txt" ; path = "C:/Users/Gael/Desktop" ; no.overwrite = TRUE ; rownames.kept = FALSE ; vector.cat = FALSE ; noquote = FALSE ; sep = 2 # for function debugging + # data = 1:3 ; output = "results.txt" ; path = "C:/Users/Gael/Desktop" ; overwrite = TRUE ; rownames.kept = FALSE ; vector.cat = FALSE ; noquote = FALSE ; sep = 2 # for function debugging # function name function.name <- paste0(as.list(match.call(expand.dots = FALSE))[[1]], "()") # end function name @@ -8796,7 +8796,7 @@ fun_report <- function( arg.check <- c(arg.check, TRUE) } } - tempo <- fun_check(data = no.overwrite, class = "logical", length = 1, fun.name = function.name) ; eval(ee) + tempo <- fun_check(data = overwrite, class = "logical", length = 1, fun.name = function.name) ; eval(ee) tempo <- fun_check(data = rownames.kept, class = "logical", length = 1, fun.name = function.name) ; eval(ee) tempo <- fun_check(data = vector.cat, class = "logical", length = 1, fun.name = function.name) ; eval(ee) tempo <- fun_check(data = noquote, class = "logical", length = 1, fun.name = function.name) ; eval(ee) @@ -8829,24 +8829,24 @@ fun_report <- function( rownames(data) <- rep("", nrow(data)) # identical row names allowed in matrices and tables } if(noquote == TRUE){ - utils::capture.output(noquote(data), file=paste0(path, "/", output), append = no.overwrite) + utils::capture.output(noquote(data), file=paste0(path, "/", output), append = ! overwrite) }else{ - utils::capture.output(data, file=paste0(path, "/", output), append = no.overwrite) + utils::capture.output(data, file=paste0(path, "/", output), append = ! overwrite) } }else if(is.vector(data) & all(class(data) != "list") & (length(data) == 1L | vector.cat == TRUE)){ if(noquote == TRUE){ - cat(noquote(data), file= paste0(path, "/", output), append = no.overwrite) + cat(noquote(data), file= paste0(path, "/", output), append = ! overwrite) }else{ - cat(data, file= paste0(path, "/", output), append = no.overwrite) + cat(data, file= paste0(path, "/", output), append = ! overwrite) } }else if(all(base::mode(data) == "character")){ # characters (array, list, factor or vector with vector.cat = FALSE) if(noquote == TRUE){ - utils::capture.output(noquote(data), file=paste0(path, "/", output), append = no.overwrite) + utils::capture.output(noquote(data), file=paste0(path, "/", output), append = ! overwrite) }else{ - utils::capture.output(data, file=paste0(path, "/", output), append = no.overwrite) + utils::capture.output(data, file=paste0(path, "/", output), append = ! overwrite) } }else{ # other object (S4 for instance, which do not like noquote() - utils::capture.output(data, file=paste0(path, "/", output), append = no.overwrite) + utils::capture.output(data, file=paste0(path, "/", output), append = ! overwrite) } sep.final <- paste0(rep("\n", sep), collapse = "") write(sep.final, file= paste0(path, "/", output), append = TRUE) # add a sep @@ -11260,8 +11260,6 @@ fun_gg_boxplot <- function( - - # add density # rasterise all kind: https://cran.r-project.org/web/packages/ggrastr/vignettes/Raster_geoms.html # log not good: do not convert as in boxplot @@ -13633,3 +13631,4 @@ if(return == TRUE){ + diff --git a/cute_little_R_functions.docx b/cute_little_R_functions.docx index fb20dd5f9d11b6696c4aaaf72e18d0fc672e3997..506aab1b28476e84a6ab11d327a996c061158029 100644 Binary files a/cute_little_R_functions.docx and b/cute_little_R_functions.docx differ diff --git a/dev/Tools Logo and sup info/Cute_little_functions.pptx b/dev/Tools Logo and sup info/Cute_little_functions.pptx new file mode 100644 index 0000000000000000000000000000000000000000..45fb4e3490d6f486fc2cb5ceb359bb143238a76b Binary files /dev/null and b/dev/Tools Logo and sup info/Cute_little_functions.pptx differ diff --git "a/dev/Tools Logo and sup info/Pr\303\251sentation1.pptx" "b/dev/Tools Logo and sup info/Pr\303\251sentation1.pptx" new file mode 100644 index 0000000000000000000000000000000000000000..b036e302d8bd8e976d87cd863b1239a834f72a96 Binary files /dev/null and "b/dev/Tools Logo and sup info/Pr\303\251sentation1.pptx" differ diff --git a/dev/Tools Logo and sup info/R_logo.svg.png b/dev/Tools Logo and sup info/R_logo.svg.png new file mode 100644 index 0000000000000000000000000000000000000000..ff7873ec65030083c8874afff873da37ec11fd89 Binary files /dev/null and b/dev/Tools Logo and sup info/R_logo.svg.png differ diff --git a/dev/Tools Logo and sup info/stock-vector-screwdriver-pictograph-with-bonus-settings-images-vector-illustration-style-is-flat-iconic-orange-518727895.jpg b/dev/Tools Logo and sup info/stock-vector-screwdriver-pictograph-with-bonus-settings-images-vector-illustration-style-is-flat-iconic-orange-518727895.jpg new file mode 100644 index 0000000000000000000000000000000000000000..43fbf3a3de262da2de0ae712ebdc0a20ec074685 Binary files /dev/null and b/dev/Tools Logo and sup info/stock-vector-screwdriver-pictograph-with-bonus-settings-images-vector-illustration-style-is-flat-iconic-orange-518727895.jpg differ diff --git a/dev/Tools Logo and sup info/stock-vector-spanner-and-screwdriver-icon-with-bonus-setup-tools-images-vector-illustration-style-is-flat-518391532.jpg b/dev/Tools Logo and sup info/stock-vector-spanner-and-screwdriver-icon-with-bonus-setup-tools-images-vector-illustration-style-is-flat-518391532.jpg new file mode 100644 index 0000000000000000000000000000000000000000..995b3bb711d8b7e1f75e75c1fa4468034f4c64d1 Binary files /dev/null and b/dev/Tools Logo and sup info/stock-vector-spanner-and-screwdriver-icon-with-bonus-setup-tools-images-vector-illustration-style-is-flat-518391532.jpg differ