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
Currently, set_contrasts and related functions can use external contrast coding schemes like so:
foo<-function(n) contr.sum(n)
foo2<-function(n_levels) contr.sum(n_levels)
# Both of these are fine
set_contrasts(df, varName~foo)
set_contrasts(df, varName~foo2)
But if the named argument isn't n or n_levels then it doesn't work
foo3<-function(boo) contr.sum(boo)
# Doesn't work
set_contrasts(df, varName~foo3)
In the definition for .bundle_params(), we can add the desired function as an optional argument then extend this block:
such that if a function is passed, we can check whether n exists and if not, look up the name of the first parameter and set n_levels to that. Basically something like:
…her open issues. Changed all instances of n_levels to n, addressing #13 and allowing contrast_code to be cleaned up a bit; handled passing of n parameter to function via tryCatch routine in functional_code, fixing #12
Currently,
set_contrasts
and related functions can use external contrast coding schemes like so:But if the named argument isn't
n
orn_levels
then it doesn't workIn the definition for
.bundle_params()
, we can add the desired function as an optional argument then extend this block:such that if a function is passed, we can check whether
n
exists and if not, look up the name of the first parameter and setn_levels
to that. Basically something like:The text was updated successfully, but these errors were encountered: