Follow-up to this comment about introducing a by argument to type_*() functions: #168 (comment)
Is there a reason to wait so long before splitting the data? It seems that in some cases we wait until nearly the end to create split_data, and in many other cases like hist or density, we need to insert special catches near the top of the function. I feel like that introduces a lot of complexity.
Have you considered splitting the data at the very top, and storing it in a nested list?
split_data = list(
facet_01 = list(by_01 = list(x, y), by_02 = list(x, y)),
facet_02 = list(by_01 = list(x, y), by_02 = list(x, y))
)
Then, all plotting functions can operate on individual elements in exactly the same way. And if the list is of length 1, we know there are no facets.
Follow-up to this comment about introducing a
byargument totype_*()functions: #168 (comment)Is there a reason to wait so long before splitting the data? It seems that in some cases we wait until nearly the end to create
split_data, and in many other cases likehistordensity, we need to insert special catches near the top of the function. I feel like that introduces a lot of complexity.Have you considered splitting the data at the very top, and storing it in a nested list?
Then, all plotting functions can operate on individual elements in exactly the same way. And if the list is of length 1, we know there are no facets.