src_local {dplyr} | R Documentation |
This is mainly useful for testing, since makes it possible to refer to local and remote tables using exactly the same syntax.
src_local(tbl, pkg = NULL, env = NULL) src_df(pkg = NULL, env = NULL) src_dt(pkg = NULL, env = NULL)
tbl |
name of the function used to generate |
pkg,env |
Either the name of a package or an environment object in which to look for objects. |
Generally, src_local
should not be called directly, but instead
one of the (currently three) constructors should be used.
if (require("Lahman")) { src_dt("Lahman") batting_df <- tbl(src_df("Lahman"), "Batting") if (require("data.table")) { src_df("Lahman") batting_dt <- tbl(src_dt("Lahman"), "Batting") } }