On Wed, 14 May 2025, at 4:18 PM, smallepsilon wrote:

> No need to apologize. I hope the following example helps clarify what I 
> mean. Suppose that modify_matrix(mat, other_args) is a function that, 
> among other things, applies eigen() to mat. For good reasons, 
> other_args has no default value. It is sometimes convenient, though, to 
> supply the user with default values. Therefore, there is another 
> function, convenient_modify_matrix():
>

I'd just use all.equal but I *think* you could just check the call is 
constructed correctly, e.g.

convenient_modify_matrix <- function(mat) modify_matrix(mat, other_args = 
default)

identical(
  body(convenient_modify_matrix),
  call("modify_matrix", quote(mat), other_args = quote(default))
)

______________________________________________
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

Reply via email to