How can I specify the schema from where to read a table in the
st_read_db() function in the sf package in R?
When I try
require(RPostgreSQL) require(sf) drv = dbDriver("PostgreSQL") con = dbConnect(drv, dbname = DBname_1, user = DBuser, host = DBhost, port = DBport, password = DBpassword) dat = st_read_db(con, table = "schema1.table1", query = "SELECT * FROM schema1.table1 LIMIT 20") dbDisconnect(con) dbUnloadDriver(drv)
I get the error:
Error: public.schema1.table1 does not exist.
It seems with this function I can only read tables from the public schema. Is this true or do I overlook something? Is this also maybe due to the early stage of the package?