I'm trying to write a table in a db using R and I got this error:
Script:
try(
silent = TRUE, {
dbWriteTable(conn, tableName, csvData, append = app, overwrite = !app)
dbDisconnect(conn)})
PS.: app <- FALSE
Error:
"Error in (function (classes, fdef, mtable) : \n unable to find an inherited method for function ‘dbWriteTable’ for signature ‘\"character\", \"character\", \"data.frame\"’\n" attr(,"class") [1] "try-error" attr(,"condition") \001NULL\001, skeleton = (function (conn, name, value, ...) stop("invalid call in method dispatch to 'dbWriteTable' (no ...
character
. For exampleRPostgres::dbWriteTable
has a signature ofc("PqConnection", "character", "data.frame")
. This suggests that yourconn
is not what it should be. - r2evans