# NOT RUN {
require(vegan)
data(eco.test)
# Note that in this example "Condition" is not replaced;
# the function Condition has a special meaning in rda,
# indicating conditioning variables; in eco.formula it is only text.
form <- eco.formula(eco, P1 + P2 + P3 + U(A) ~ E1 + E2 + Condition(X+Y))
rda(form)
form2 <- eco.formula(eco, P1 + P2 + P3 + U(A) ~ E1 + E2 + X + Y)
lm(form2)
# parsing with magrittr
eco.formula(eco, P1 + P2 + P3 + U(A) ~ U(E) + Condition(X+Y)) %>% rda
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab