Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(dplyr)
- library(DBI)
- library(RPostgres)
- library(tibble)
- conn <- dbConnect(RPostgres::Postgres(),
- host = url$host,
- port = url$port,
- dbname = url$dbname,
- user = url$user,
- password = url$password
- )
- test <- tibble(
- words = c("hallo","ja", "nein"),
- value = c(3,4,5),
- time= as.POSIXct(c("2016-05-04 04:32","2016-06-02 09:37","2016-07-12 010:43")))
- test2 <- tibble(
- words = c("hallo","ja", "nein"),
- value = c(3,4,5),
- time= c("2016-05-04 04:32","2016-06-02 09:37","2016-07-12 010:43"))
- dbWriteTable(conn = conn, name = "words", value = test)
- > Error: Table fruits exists in database, and both overwrite and append are FALSE
- dbWriteTable(conn = conn, name = "words2", value = test2)
- > [1] TRUE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement