Load all the tables in a schema as data frames into your environment from a PostgreSQL database.

sbf_load_datas_from_pg(
  schema = getOption("psql.schema", "public"),
  rename = identity,
  env = parent.frame(),
  config_path = getOption("psql.config_path", NULL),
  config_value = getOption("psql.config_value", "default")
)

Arguments

schema

A string of the schema name. Default value is "public".

rename

A single function argument which takes a character vector and returns a character vector of the same length. Used to rename objects before they are loaded into the environment.

env

The environment to the objects into

config_path

A string of a file path to the yaml configuration file. The default value grabs the file path from the psql.config_path option and uses NULL if no value supplied.

config_value

A string of the name of value. The default value grabs the value from the psql.config_value option and uses "default" if no value is supplied.

Value

An invisible character vector of the paths to the saved objects.

Examples

if (FALSE) { # \dontrun{
sbf_load_datas_from_pg()
sbf_load_datas_from_pg(schema = "capture")
sbf_load_datas_from_pg(rename = toupper)
} # }