PALMIER Patrick - CETE NP/INFRA/TRF
2010-May-07 07:01 UTC
[R] Package RPostgreSQL : Problem with dbWriteTable
Un texte encapsul? et encod? dans un jeu de caract?res inconnu a ?t? nettoy?... Nom : non disponible URL : <https://stat.ethz.ch/pipermail/r-help/attachments/20100507/f5128631/attachment.pl>
PALMIER Patrick - CETE NP/INFRA/TRF
2010-May-12 06:44 UTC
[R] Package RPostgreSQL : Problem with dbWriteTable
Hello, I have a probem with dbWriteTable method of package RPostrgreSQL The table is well added in the database but R doesn't succeed in inserting rows But If I send the "COPY FROM" as an sql query in R, the rows are then well added I think it is a problem with the temp file create by dbWriteTable As anyone solved this problem? Thanks in advance -- *Patrick PALMIER** **Centre d'?tudes Techniques de l'?quipement Nord - Picardie D?partement Infrastructures */*Trafic ? Socio-?conomie */2, rue de Bruxelles, BP 275 59019 Lille cedex FRANCE T?l: +33 (0) 3 20 49 60 70 Fax: +33 (0) 3 20 49 63 69
Sean Davis
2010-May-18 12:31 UTC
[R] Fwd: [R-sig-DB] Package RPostgreSQL : Problem with dbWriteTable
---------- Forwarded message ---------- From: PALMIER Patrick - CETE NP/INFRA/TRF < Patrick.Palmier@developpement-durable.gouv.fr> Date: Tue, May 18, 2010 at 8:05 AM Subject: Re: [R-sig-DB] Package RPostgreSQL : Problem with dbWriteTable To: "Davis, Sean (NIH/NCI) [E]" <sdavis2@mail.nih.gov> Hello, Here is the output and se sessionInfo() I precise that the postgres database has been created with the WIN1252 encoding User postgres has the complete access rights for the temp directory I've tried with another user, it is stille the same problem An idea to solve the problem?> library(RPostgreSQL)Le chargement a nécessité le package : DBI> drv<-dbDriver("PostgreSQL") > con<-dbConnect(drv,dbname="test",user="postgres",password="*******") > t<-data.frame(X=1:1000,Y=1000:1) > dbWriteTable(con,"toto",t,append=T)Error in postgresqlExecStatement(conn, statement, ...) : RS-DBI driver: (could not Retrieve the result : ERREUR: n'a pas pu ouvrir le fichier « C:DOCUME~1PalmierPLOCALS~1TempRtmpfWIqkh sdbi4eda3c82 » pour une lecture : Invalid argument ) [1] FALSE Message d'avis : In postgresqlWriteTable(conn, name, value, ...) : could not load data into table> sessionInfo()R version 2.11.0 (2010-04-22) i386-pc-mingw32 locale: [1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252 LC_MONETARY=French_France.1252 LC_NUMERIC=C [5] LC_TIME=French_France.1252 attached base packages: [1] grid stats graphics grDevices utils datasets methods base other attached packages: [1] RPostgreSQL_0.1-6 DBI_0.2-5 foreign_0.8-40 memisc_0.95-30 MASS_7.3-5 lattice_0.18-5 loaded via a namespace (and not attached): [1] tools_2.11.0 *Patrick PALMIER** **Centre d'Études Techniques de l'Équipement Nord - Picardie Département Infrastructures **Trafic – Socio-économie *2, rue de Bruxelles, BP 275 59019 Lille cedex FRANCE Tél: +33 (0) 3 20 49 60 70 Fax: +33 (0) 3 20 49 63 69 Le 18/05/2010 13:27, > Sean Davis (par Internet, dépôt seandavi@gmail.com) a écrit : On Wed, May 12, 2010 at 2:44 AM, PALMIER Patrick - CETE NP/INFRA/TRF < Patrick.Palmier@developpement-durable.gouv.fr> wrote:> Hello, > > I have a probem with dbWriteTable method of package RPostrgreSQL > The table is well added in the database but R doesn't succeed in > inserting rows > But If I send the "COPY FROM" as an sql query in R, the rows are then > well added > I think it is a problem with the temp file create by dbWriteTable > > As anyone solved this problem? > >Hi, Patrick. A reproducible example and the output of sessionInfo() would be useful here. Sean [[alternative HTML version deleted]]
Apparently Analagous Threads
- R in batch mode packages loading question
- problem with plot style (pch) with lattice in legend
- Not able to write to PostgreSQL database using "dbWriteTable"
- Graphic legend with mathematical symbol, numeric variable and character variable
- Hard memory limit of 16GB under Windows?