diff --git a/DESCRIPTION b/DESCRIPTION index 13f0a6c..a5a9aa7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: autotest Title: Automatic Package Testing -Version: 0.0.2.203 +Version: 0.0.2.204 Authors@R: c( person("Mark", "Padgham", , "mark.padgham@email.com", role = c("aut", "cre"), comment = c(ORCID = "0000-0003-2172-5265")), diff --git a/R/function-param-types.R b/R/function-param-types.R index 73b317b..e76c910 100644 --- a/R/function-param-types.R +++ b/R/function-param-types.R @@ -29,10 +29,17 @@ get_param_info <- function (trace_data, fn_pars) { # param_types are in [single, vector, tabular] param_types <- rep (NA_character_, nrow (fn_pars_i)) + is_single <- vapply (fn_pars_i$length, function (j) all (as.integer (strsplit (j, ",") [[1]]) <= 1L), logical (1L)) param_types [which (is_single)] <- "single" + + is_vector <- vapply (fn_pars_i$length, function (j) + any (as.integer (strsplit (j, ",") [[1]]) > 1L), + logical (1L)) + param_types [which (is_vector)] <- "vector" + is_rect <- vapply (trace_data [par_index], function (j) j$typeof == "list" && length (dim (j$par_eval)) == 2, logical (1L)) diff --git a/codemeta.json b/codemeta.json index 3b0d7de..a941d7e 100644 --- a/codemeta.json +++ b/codemeta.json @@ -8,7 +8,7 @@ "codeRepository": "https://github.com/ropensci-review-tools/autotest", "issueTracker": "https://github.com/ropensci-review-tools/autotest/issues", "license": "https://spdx.org/licenses/GPL-3.0", - "version": "0.0.2.203", + "version": "0.0.2.204", "programmingLanguage": { "@type": "ComputerLanguage", "name": "R",