diff --git a/cute_little_R_functions.R b/cute_little_R_functions.R index be5613b0bc21f0fadebaf8e669919f2db21d6497..07ffb6a93858573519a321d51d8d83e81bca9f4a 100644 --- a/cute_little_R_functions.R +++ b/cute_little_R_functions.R @@ -171,7 +171,7 @@ # todo list check OK # Check r_debugging_tools-v1.4.R OK -# Check fun_test() (see cute_checks.docx) OK +# Check fun_test() 20201107 (see cute_checks.docx) OK # example sheet OK # check all and any OK # -> clear to go Apollo @@ -317,17 +317,7 @@ base::class(print), base::class(data.name), base::class(fun.name) ) -# tempo.cat1 <- NULL -# tempo.cat2 <- NULL tempo <- ! sapply(lapply(tempo.class, FUN = "%in%", basic.class), FUN = all) -# for(i1 in tempo.arg.base){ -# tempo.class <- base::class(get(i1, env = sys.nframe(), inherit = FALSE)) -# if( ! all(tempo.class %in% basic.classes)){ -# tempo.cat1 <- c(tempo.cat1, i1) -# tempo.cat2 <- c(tempo.cat2, paste0(tempo.class, collapse = " ")) -# } -# } -# if( ! is.null(tempo.cat1)){ if(any(tempo)){ tempo.cat1 <- tempo.arg.base[tempo] tempo.cat2 <- sapply(tempo.class[tempo], FUN = paste0, collapse = " ") @@ -726,7 +716,7 @@ warn.print = TRUE # warn.print: logical. Print potential warnings at the end of the execution? If FALSE the warning messages are added in the output list as an additional compartment (or NULL if no message). # RETURN # A list containing information, depending on the class and type of data. The backbone is generally: -# $NAME: the name of the object +# $NAME: name of the object # $CLASS: class of the object (class() value) # $TYPE: type of the object (typeof() value) # $LENGTH: length of the object (length() value) @@ -843,11 +833,12 @@ if( ! is.null(n)){ if(n < 1){ tempo.cat <- paste0("ERROR IN ", function.name, ": n ARGUMENT MUST BE A POSITIVE AND NON NULL INTEGER") stop(paste0("\n\n================\n\n", tempo.cat, "\n\n================\n\n"), call. = FALSE) # == in stop() to be able to add several messages between == -} +}else if(is.finite(n)){ # warn.count <- warn.count + 1 tempo.warn <- paste0("SOME COMPARTMENTS CAN BE TRUNCATED (n ARGUMENT IS ", n, ")") warn <- paste0(ifelse(is.null(warn), tempo.warn, paste0(warn, "\n\n", tempo.warn))) } +} # end other checkings # reserved word checking # end reserved word checking diff --git a/cute_little_R_functions.docx b/cute_little_R_functions.docx index 5781644a85a2e4d382ed1b2bcacd06f3b922fa49..8ce33baaf91ff75245ca66996ca2a475d394549a 100644 Binary files a/cute_little_R_functions.docx and b/cute_little_R_functions.docx differ diff --git a/other/cute_checks.docx b/other/cute_checks.docx index b5bece5390777d75ed7a1788e2d8899188cb12f3..a364e92b2d8b1282b407c0c408b16ce5cf8cb171 100644 Binary files a/other/cute_checks.docx and b/other/cute_checks.docx differ diff --git a/other/test_dataset.20201108.RData b/other/test_dataset.20201108.RData new file mode 100644 index 0000000000000000000000000000000000000000..efaa9f9d7f75414cf932dc5f589017621aa7b8b8 Binary files /dev/null and b/other/test_dataset.20201108.RData differ diff --git a/other/test_dataset.RData b/other/test_dataset.RData deleted file mode 100644 index e622341ab919f323354d0823c906f66ceef006f6..0000000000000000000000000000000000000000 Binary files a/other/test_dataset.RData and /dev/null differ