[R] dbWriteTable does not append rows in database

2021-09-13 Thread Kai Yang via R-help
Hi List, I want to append some rows from R into sql server. So, I submitted the code below. there is not any error message: dbWriteTable(conn = con, name = "PMDB._Alias_A", value = try1, overwrite=FALSE, append=TRUE, row.names = FALSE) But when I try to query the data from the Sql server, I can n

[R] dbWriteTable() command (package RPostgreSQL) does not accept append=TRUE statement

2012-02-25 Thread Cornelius Senf
Hey everyone! I try to convert severall raster files into a dataframe and then store them in a postegresql database using the RPostgreSQL package (see code example below). The for loop below should ideally attach each rasters dataframe to the existing table "modis" created with the first raste

Re: [R] dbWriteTable(con, access_log, overwrite = F).....

2012-01-16 Thread Milan Bouchet-Valat
Le lundi 16 janvier 2012 à 14:14 +0100, Poul Kristensen a écrit : > I am new to R. > > My goal is to make a crosstable from a Apache access.log, which I want > to load into PostgreSQL database at first to > learn more abour R and DBI and datatypes. When the I have got the > access.log in the datab

[R] dbWriteTable(con, access_log, overwrite = F).....

2012-01-16 Thread Poul Kristensen
I am new to R. My goal is to make a crosstable from a Apache access.log, which I want to load into PostgreSQL database at first to learn more abour R and DBI and datatypes. When the I have got the access.log in the database I will try to make the crosstable! Trying to load the Apache access.log i

Re: [R] dbWriteTable with field data type

2011-11-08 Thread Gabor Grothendieck
? > > If not, what is the best way to create a table with specified field data > types (with the RpgSQL package/R)? > dbWriteTable will set types based on the input data.frame classes but if you don't like them then you can use the sql create table statement to define a table layou

[R] dbWriteTable with field data type

2011-11-08 Thread Ben quant
Hello, When I do: dbWriteTable(con, "r.BOD", cbind(row_names = rownames(BOD), BOD)) ...can I specify the data types such as varchar(12), float, double precision, etc. for each of the fields/columns? If not, what is the best way to create a table with specified field data types (with the RpgSQL

Re: [R] dbWriteTable error message

2011-08-31 Thread Prof Brian Ripley
On Wed, 31 Aug 2011, Henri-Paul Indiogine wrote: I am at loss of what is going on here ... I am trying to write to a SQLite database: con <- dbConnect(dbDriver("SQLite"), dbname="pres-docs.rqda") I have a data frame that is 889 rows by 7 columns. The column number and types agree with the da

Re: [R] dbWriteTable error message

2011-08-31 Thread Henri-Paul Indiogine
I am answering myself here 2011/8/31 Henri-Paul Indiogine : > dbWriteTable(con, "fileAttr", DF.4, row.names=FALSE, overwrite=TRUE) > > Then I get the following error: > > [1] FALSE > Warning message: > In value[[3L]](cond) : >  RAW() can only be applied to a 'raw', not a 'character' I have no

[R] dbWriteTable error message

2011-08-31 Thread Henri-Paul Indiogine
I am at loss of what is going on here ... I am trying to write to a SQLite database: con <- dbConnect(dbDriver("SQLite"), dbname="pres-docs.rqda") I have a data frame that is 889 rows by 7 columns. The column number and types agree with the database table columns and column type. dbWriteTable(

[R] dbWriteTable

2010-10-22 Thread Santosh Srinivas
I'm having a strange problem with dbWriteTable ... I have the dbWriteTable inside a batchloop. dbWriteTable(con,"mutual_funds",tmp_MF_Data_F,append=T,row.names=F) # append rows to the data table The data gets updated for the first 3 loops (out of say 100) but then there is no error a

[R] dbWriteTable in loop

2009-06-30 Thread jasmine1958
Hi, I have to write the results of a loop in a database, and I'm using dbWriteTable(con, "output", data). Is it possible to use something like for(i in 1:n) ... tmp <- sprintf("output%s", i) dbWriteTable(con, tmp, dati) to write in the database each table produced by each run of the loop? if

Re: [R] dbWriteTable with row.names=(TRUE | FALSE)

2008-08-08 Thread Prof Brian Ripley
This is a bug that we've seen before. It looks like this line of mysqlWriteTable if(missing(field.types) || is.null(field.types)){ ## the following mapping should be coming from some kind of table ## also, need to use converter functions (for dates, etc.) field.types <- sap

[R] dbWriteTable with row.names=(TRUE | FALSE)

2008-08-08 Thread Hansruedi Baetschmann
Hello Saving a dataframe with dbWriteTable to a relational database with the parameter row.names set to FALSE works fine, doing so the parameter set to TRUE gives an error message "/Fehler in field.types$row.names : $ operator is invalid for atomic vectors/" (see the protocol below). I work

[R] dbWriteTable with row.names=(TRUE | FALSE)

2008-08-08 Thread Hansruedi Baetschmann
Hello Saving a dataframe with dbWriteTable to a relational database with the parameter row.names set to FALSE works fine, doing so the parameter set to TRUE gives an error message "/Fehler in field.types$row.names : $ operator is invalid for atomic vectors/" (see the protocol below). I work