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