Hello, I'm working with a database that I usually access with the workbench. To start importing directly into R, I'm using the RMySQL library. I can make the connection and find my tables, but at the time of importing with tbl it returns me a list. How can I make it return me a df (object table1 in the example)?
Example:
con <- src_mysql(dbname = "dbname",
host = "localhost",
port = 3306,
user = "user",
password = "my password")
tabela1 <- tbl(con, "tabela1")
I also tried the dbReadTable command, but it returns me an error message:
*Error in (function (classes, fdef, mtable) :
unable to find an inherited method for function ‘dbReadTable’ for signature ‘"src_dbi", "character"’*
Thanks for the help!