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
Thanks for this report 😊 Before I open the pull request where I address this, I document my evaluation as requested.
The primary code in modify_defaults that adds to the modifyList part is the following:
extra <- setdiff(names(x), names(defaults))
if (strict && (length(extra) > 0L)) {
stop(
"Unknown variable types: ",
toString(extra),
"\n ",
"Use only known tags or set `allow_extra = TRUE`",
call. = FALSE
)
}
This primarily is to check for known tags. Given that #22 indicates this can be dropped altogether, modify_defaults is indeed redundant. Will be removing this function and ensuring everything remains functional. 👍
I don't exactly remember if/why this function was necessary.
I also think that
modifyList()
has been updated in the last couple of years and might now be appropriate to use directly.We should evaluate if
modify_defaults()
is really necessary or can be replaced bymodifyList()
.In all cases, this function should have more & better comments:
modifyList()
so we don't have to go through this exercise againkeep.null
is necessary rather an affirmation that it is:https://github.com/epiverse-trace/datatagr/blob/d1d89459f8df0b5ac57636225c53cc243b3514c9/R/modify_defaults.R#L31
The text was updated successfully, but these errors were encountered: