
Last chance! 50% off unlimited learning
Sale ends in
st_write_db(conn = NULL, obj, table = substitute(obj), geom_name = "wkb_geometry", ..., dropTable = FALSE, binary = TRUE)
sf
dbWriteTable
table
be dropped first?if (Sys.getenv("USER") %in% c("travis", "edzer")) {
library(sp)
data(meuse)
sf = st_as_sf(meuse, coords = c("x", "y"), crs = 28992)
library(RPostgreSQL)
conn = dbConnect(PostgreSQL(), dbname = "postgis")
st_write_db(conn, sf, "meuse_tbl", dropTable = FALSE)
}
Run the code above in your browser using DataLab