Yu-Group/simChef

More flexible `add_vary_across()`?

jpdunc23 opened this issue · 2 comments

Currently, the following is an error, because add_vary_across was previously used for x:

expect_error(
experiment %>% add_vary_across(.dgp = c("DGP1", "DGP2"), x = 1:3)
)

Would it be better to append 1:3 to the list of variations on x instead?

I would prefer to keep this as an error. It could get confusing to an outside reader to keep track of all the parameter values if they get added at various points in the code. Returning an error would hopefully help to encourage cleaner code.

Fair point! Thanks.