[R-sig-DB] adding to a MySQL database from within R?

Sean Davis @d@v|@2 @end|ng |rom m@||@n|h@gov
Sat Oct 9 14:47:23 CEST 2010


On Sat, Oct 9, 2010 at 12:00 AM, Spencer Graves <
spencer.graves using structuremonitoring.com> wrote:

>  Hello, All:
>
>
>       How can I add rows to a MySQL database?
>
>
>       I can do it manually within MySQL server 5.1.50-community.  I can
> connect to it using the RMySQL package.  When I tried "dbReadTable
> {DBI}", I got a warning that "table headers exists:
>
>
>  > MySQL. <- MySQL()
>  > MySQLcon <- dbConnect(MySQL., user=User, password=pw, dbname=myDB)
>  > dbWriteTable(MySQLcon, 'headers', a.data.frame)
> Warning message:
> In mysqlWriteTable(conn, name, value, ...) :
>   table headers exists in database: aborting mysqlWriteTable
>
>
>       I know that table "headers" exists:  I want to add to it, not
> create the entire table from scratch at once.
>
>
See the help for dbWriteTable().  In particular, check out the append
parameter.

Sean

	[[alternative HTML version deleted]]




More information about the R-sig-DB mailing list