Thanks for your replies, I only just noticed them as I had daily-digest =
true and someone seems to have removed my e-mail address when replying to
the list. Never mind, I have now switched my daily-digest to false.
Yes - The issue is that "myfun(A = 1, B = 2, B = 4)" in the example below
is ambig
sing an arbitrary fix.
R lists are more like a BAG data structure than a SET.
-Original Message-
From: R-package-devel On Behalf Of
Vincent van Hees
Sent: Monday, November 8, 2021 11:25 AM
To: Duncan Murdoch
Cc: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] R feature suggestion:
och
Cc: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] R feature suggestion: Duplicated function
arguments check
Thanks Duncan, I have tried to make a minimalistic example:
myfun = function(...) {
input = list(...)
mysum = function(A = c(), B= c()) {
return(A+B)
}
i
1:25 AM
To: Duncan Murdoch
Cc: r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] R feature suggestion: Duplicated function
arguments check
Thanks Duncan, I have tried to make a minimalistic example:
myfun = function(...) {
input = list(...)
mysum = function(A = c(), B= c()) {
return(A+B
Thanks Duncan, I have tried to make a minimalistic example:
myfun = function(...) {
input = list(...)
mysum = function(A = c(), B= c()) {
return(A+B)
}
if ("A" %in% names(input) & "B" %in% names(input)) {
print(mysum(A = input$A, B = input$B))
}
}
# test:
> myfun(A = 1, B = 2, B
8, 2021 11:04 AM
To: Vincent van Hees ;
r-package-devel@r-project.org
Subject: Re: [R-pkg-devel] R feature suggestion: Duplicated function
arguments check
On 08/11/2021 10:29 a.m., Vincent van Hees wrote:
> Not sure if this is the best place to post this message, as it is more
> of a sugg
On 08/11/2021 10:29 a.m., Vincent van Hees wrote:
Not sure if this is the best place to post this message, as it is more of a
suggestion than a question.
When an R function accepts more than a handful of arguments there is the
risk that users accidentally provide arguments twice, e.g myfun(A=1,
Not sure if this is the best place to post this message, as it is more of a
suggestion than a question.
When an R function accepts more than a handful of arguments there is the
risk that users accidentally provide arguments twice, e.g myfun(A=1, B=2,
C=4, D=5, A=7), and if those two values are not