permute
permute copied to clipboard
Make `how()` easier to use
Right now you have to do
# 1
h <- with(data,
how(plots = Plots(strata = f), blocks = block)
)
# or 2
h <- how(plots = Plots(strata = data$f), blocks = data$block)
I have been thinking for a while that allowing strata
and blocks
to take a formula and giving how()
a new data
argument would be a nice user-friendlyness update.
I'm thinking of
h <- how(plots = Plots(strata = ~ f), blocks = ~ block, data = data)
This would require data
to be passed on the Plots()
in some way.
Importantly, I will need to do this formula NSE myself - consult Thomas Lumley's Standard nonstandard evaluation rules document - as we can't have any Tidyverse code in permute as that would mean vegan would have a dependency on those packages too.