## Not run:
# library(intubate)
# library(magrittr)
# library(modeltools)
#
# data("iris")
#
# ## Original function to interface
# ModelEnvFormula(Species + Petal.Width ~ . -1, data = iris,
# subset = sample(1:150, 10))
# ParseFormula(Species + Petal.Width ~ . -1, data = iris)
#
# ## The interface puts data as first parameter
# ntbt_ModelEnvFormula(iris, Species + Petal.Width ~ . -1, subset = sample(1:150, 10))
# ntbt_ParseFormula(iris, Species + Petal.Width ~ . -1)
#
# ## so it can be used easily in a pipeline.
# iris %>%
# ntbt_ModelEnvFormula(Species + Petal.Width ~ . -1, subset = sample(1:150, 10))
#
# iris %>%
# ntbt_ParseFormula(Species + Petal.Width ~ . -1)
# ## End(Not run)
Run the code above in your browser using DataLab