You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Overloading tbl_format_setup should enable the user to opt-out from printing the additional line. However, this information must be passed down to the function somehow. Pre 1.10 we could simply use the ellipsis from print:
print(mt, show_attr=FALSE)
This still works but throws the warning.
I think it is a valid use-case to add some more sub-class specific arguments to print and let the underlying workhorse functions handle them appropriately. To avoid the warning altogether, I have to make a clone of print.tbl which does not call format_tbl directly anymore, but where I copy and paste the code from format_tbl undoing the ellipsis check.
So I either I am overlooking the obvious, or this change actively wants to stop us from adding custom arguments to print. Thus, some clarification would be really helpful (even if it is yes, we do not want you morons to add arguments to print for this and that reason ;) )
The text was updated successfully, but these errors were encountered:
Thanks. This has been a silent check_dots_empty(), and if this causes trouble, we can think this over. I wonder if this is a case for check_dots_used() instead of check_dots_empty() . Would you like to take a look?
Could you elaborate the reasoning behind check_dots_(used|empty)?
I would assume that we want to allow the usage of ellipsis, because it would enable the package authors to extend print as outlined (and in fact you are already passing down ... to tbl_format_setup anyways), so I guess this behavior is intended. Thus, making sure that there are no additional arguments in ... (as per check_dots_empty) does not make sense to me.
check_dots_used on the other hand seems to make much more sense. We allow for the usage of ..., but we want to ensure that we do not pass arguments which are nowhere consumed.
Disclaimer: I posted this first on SO but I really think the discussion should be happening here.
With the changes introduced in pillar 1.10.0
...
must now be empty in printing and formatting.I am now, however, wondering, how one would allow additional arguments in
print
to be properly handled. Here's a motivating example:Overloading
tbl_format_setup
should enable the user to opt-out from printing the additional line. However, this information must be passed down to the function somehow. Pre 1.10 we could simply use the ellipsis fromprint
:This still works but throws the warning.
I think it is a valid use-case to add some more sub-class specific arguments to
print
and let the underlying workhorse functions handle them appropriately. To avoid the warning altogether, I have to make a clone ofprint.tbl
which does not callformat_tbl
directly anymore, but where I copy and paste the code fromformat_tbl
undoing the ellipsis check.So I either I am overlooking the obvious, or this change actively wants to stop us from adding custom arguments to
print
. Thus, some clarification would be really helpful (even if it is yes, we do not want you morons to add arguments to print for this and that reason ;) )The text was updated successfully, but these errors were encountered: