top_mixes() error when no EARs exceed threshold
name: Luke Loken
about: `top_mixes()` errors when no data meet EAR threshold
top_mixes()
produces an error if there are no mixtures that exceed the EAR threshold provided. Probably need an if statement in the function before proceeding to a summation step.
cs <- chemical_summary
group_by_this <- "endPoint"
ear_threshold <- 1
site_threshold <- 2
top_combos <- top_mixes(cs, group_by_this,
ear_threshold,
site_threshold)
Returns Error in sum(n_combos) : invalid 'type' (list) of argument