## Not run:
# library(intubate)
# library(magrittr)
# library(leaps)
#
# ## Original function to interface
# fit <- regsubsets(Fertility ~ ., data = swiss, nbest = 2)
# summary(fit)
#
# ## The interface reverses the order of data and formula
# fit <- ntbt_regsubsets(data = swiss, Fertility ~ ., nbest = 2)
# summary(fit)
#
# ## so it can be used easily in a pipeline.
# swiss %>%
# ntbt_regsubsets(Fertility ~ ., nbest = 2) %>%
# summary()
# ## End(Not run)
Run the code above in your browser using DataLab