Closed discoleo closed 1 year ago
there are no argument names for arguments passed to make_design via ..., so it would be misleading to put them in.
There are 2 examples: one can infer from the 2nd example the meaning of the parameters. These are also briefly mentioned in the vignette Incorporating Design, but the arguments are not named throughout the vignette.
However, you could easily write a named list:
Bacteria = list(c("Str1", "Str2", "Str3",
"Str4", "Str5", "Str6"),
2:7,
2:11,
"123456",
FALSE)
# use the pseudo-names:
Bacteria = list(values = c("Str1", "Str2", "Str3",
"Str4", "Str5", "Str6"),
rows = 2:7, cols = 2:11,
pattern = "123456",
byrow = FALSE)
It is far clearer to the reader. Especially rare arguments (like byrow = FALSE) benefit from the explicit naming. I believe that the naming of the elements of the list will not break the current code.
It is easy to actually use named arguments in the code as well:
Before line 1817 (version 1.3.0 on GitHub):\ if(is.null(names(dots_args[[i]]))) names(dots_args[[i]]) = ...;\ Also possible: You can check if the argument byrow is provided or not; set it explicitly to FALSE in the latter case and access the named arguments.
Vignette: Incorporate Designs
Uncommon arguments to functions should be named:
Example
Enhancement