Displaying 20 results from an estimated 100 matches for "dbwritet".
Did you mean:
dbwrite
2008 Nov 06
1
RMySql inserts \r when using dbWriteTable
I am using R 2.8 and the latest versions of RMySQL on a Windows XP 64 bit
machine.
I was wondering if someone could help me figure out how to use dbWriteTable
without inserting \r into my table. Consider the following code snippet,
which is
run after I connect to my database.
myDFOut = dbReadTable(conn, "myDF")
print(myDFOut)
myDFIn = data.frame(x=paste("x", 1:5, sep = ""), y = paste("y", 1:5, sep =
"&q...
2012 Jun 12
1
Not able to write to PostgreSQL database using "dbWriteTable"
Dear R User's
Please help me to debug this issue. I am trying to write some data ( i=
6) to PostgreSQL database, but it not writing.
Is there any issue in the way I use "dbWriteTable"?
++++++++++++++++++ Source Code ++++++++++++++++++++++++
library("DBI")
library("RPostgreSQL")
drv1 <- dbDriver("PostgreSQL")
i=6
connAE1 <- dbConnect(drv1,host = "xx.xxx.xxx.xxx", port = "6443",
dbname="DB",user = "...
2017 Aug 29
2
DBI::dbWriteTable syntax error apparently from quotes
I have been successfully using RODBC for a long time (years) to connect to
MS SQL Server from R.
This week I wanted to try using odbc but I am seeing some problems which
may be related to how I set up my driver and/or connection.
The dbWriteTable manual page gives as an example command:
dbWriteTable( pDB$con, "mtcars", mtcars[1:5,])
When I try this I get the following error
Error: <SQL> 'CREATE TABLE "mtcars" (
"row_names" varchar(255),
"mpg" FLOAT,
"cyl" FLOAT,
&quo...
2011 Dec 02
2
help in dbWriteTable
hi
I need some help in dbWriteTable.
I'm not able to insert the rows in the table if the column order are not
same in the database and in the dataframe which i'm inserting. Also facing
issue if the table is already created externally and inserting it thru
dbWrite.
is there some way that we can sepecify the rownames in t...
2017 Aug 29
0
DBI::dbWriteTable syntax error apparently from quotes
...t;ericjberger at gmail.com> wrote:
>I have been successfully using RODBC for a long time (years) to connect
>to
>MS SQL Server from R.
>This week I wanted to try using odbc but I am seeing some problems
>which
>may be related to how I set up my driver and/or connection.
>The dbWriteTable manual page gives as an example command:
>
>dbWriteTable( pDB$con, "mtcars", mtcars[1:5,])
>
>When I try this I get the following error
>
>Error: <SQL> 'CREATE TABLE "mtcars" (
> "row_names" varchar(255),
> "mpg" FLOAT,...
2010 Oct 13
2
Rmysql - dbWritetable
Dear Rusers,
I am trying to feed my database with data from a file.
But since my file (2010101000.txt) there`s no headers I am facing problem
because the
result data.frame is not separated my columns.
How could I set variables names for each columns in *dbWriteTable*? I have
tried the command below but I don`t know how to fill the *field.type*option.
dbWriteTable(con, "b20101010", "./2010101000.txt", overwrite = T, sep =
"\t",row.names=c("V01", "V02", "V03", "V04", "V05", &qu...
2010 Jul 16
1
Troubles with DBI's dbWriteTable in RMySQL
...9;, 'sd', 'loglik', 'aic','bic',
'chisq', 'chisqpvalue', 'chisqdf')]
ndf
The data in NDF is perfect, exactly what I expected when I print the
contents as shown in the last statement above.
On the asumption tha tthat is a data frame, I tried
dbWriteTable(con,"test1",ndf);
But I received the following error:
Error in function (classes, fdef, mtable) :
unable to find an inherited method for function "dbWriteTable", for
signature "MySQLConnection", "character", "matrix"
Then, on the assumptio...
2010 May 07
2
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>
2005 Dec 14
0
SAS.xpt/STATA.dta, field descriptions, and dbWriteTable
...and STATA, thanks, I
am told, to stat-transfer. The two files, ostensibly,
contain the same data, just in different formats.
My goal: Move these files to MySQl without the help of
SAS or STATA (which I do not have).
The tools I am using are:
1. sasxport.get from Hmisc
2. read.dta from foreign
3. dbWriteTable with the MySQL driver to create and
populate the tables.
The import and table creation went well, though the
SAS file created all text field types in the MySQl
database. (I am not sure if this is a characteristic
of the original data set or a feature of sasxport.)
Importing and writing to My...
2007 Jun 06
1
Question: RMySQL bulk load/update one column, dbWriteTable()?
...reading using RMySQL trying to load one R vector into a
table column. To be more specifically, the table is there populated. Now I
add a new column and want to populate this.
Can some colleagues on this list teach me how to do this? I know how to
write one R object/table into MYSQL table using dbWriteTable. But in this
situation, I just want to do one column.
Thanks much in advance.
--
Waverley
[[alternative HTML version deleted]]
2009 Jun 30
0
dbWriteTable in loop
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 not, do you have alternative solutions?
thanks in advance...
2010 Oct 12
1
append rows to Sybase datatable using RJDBC
...table, but have problem appending rows
to existing one. It either complains "Table *** already exists" or
simply overwrite the existing one. Here is the example.
I am trying to append 'data' to the existing datatable 'tmp'
> data
SecurityID Ticker
1 12345 AAPL
> dbWriteTable(conn, "tmp", data, append = T, overwrite = F)
Error in .local(conn, name, value, ...) :
Table 'tmp' already exists
> dbWriteTable(conn, "tmp", data, append = T)
[1] TRUE
The first dbWriteTable failed as it's complaining "tmp already exists,
it looks str...
2010 Oct 22
0
dbWriteTable
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 and data doesn't update.
The...
2011 Nov 08
1
dbWriteTable with field data type
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 package/R)?
Regard...
2012 Jan 16
1
dbWriteTable(con, access_log, overwrite = F).....
...ake 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 into PostgreSQL I get an error.
dbWriteTable(con, access_log, overwrite = F);
returns
Error in .Internal(is.vector(x, mode)) : 'x' is missing?
Thanks
Poul
Poul Kristensen
IT-Konsulent / Consultant
Det Kongelige Bibliotek | The Royal Library IT-afdelingen |
Information Technology
P.O. Box 2149 | DK-1016 K?benhavn K
tel +45...
2008 Aug 11
1
Unwanted carriage returns storing dataframes with dbWriteTable
If I save a dataframe with a character-typed last column to a relational
database with dbWriteTable, the values in the last column of the
resulting table in the database will have a '\r' (carriage return)
appended. If I read back the dataframe with dbReadTable the last column
in the resulting dataframe has also '\r' appended (see protocol below).
Setting or unsetting sql-...
2011 Aug 31
2
dbWriteTable error message
...oss 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(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'
Where could I start looking?
Thanks,
Henri-Paul
--
Henri-Paul Indi...
2004 May 25
0
RMySQL problem - SOLVED
Hi,
The problem was the row.names that were sent to the database and created
an primary key duplicate. Now it works fine.
BTW congratulations for the package. It copied 15300 rows by 11 columns
in less than 5 seconds, in my PIII 833 with 1 GB RAM.
> system.time(dbWriteTable(con, "TBL_SIMDATA", TBL.SIMDATA, append =
TRUE, row.names=F))
[1] 3.87 0.05 4.86 0.01 0.00
Just one suggestion. It would be usefull to have a more verbose output,
maybe the "LOAD DATA INFILE" output.
Thanks for your help.
EJ
On Tue, 2004-05-25 at 13:01, Sean Davis wr...
2006 May 23
1
RMySQL on Mac OS 10.4
...2435.html saying that "RS-DBI driver warning: (MySQL
mismatch between compiled version 4.0.24 and runtime version 4.1.14)".
I was able to get this error message to disappear by compiling MySQL
with gcc 3.3, and now I can connect to my database and run queries,
but when I try to use dbWriteTable, I get this error:
> dbWriteTable(con, "test", rnorm(100))
Error in .class1(object) : no direct or inherited method for function
'dbWriteTable' for this call
For more info, I am running OS X 10.4.6, R 2.2.1, I have compiled
RMySQL from source version 0.5-7, and I'...
2011 Jan 04
2
RSQLite to input dataframe
...pologize for raising a query which seems to be a stupid interpretation on my part. I am trying to learn SQLite.
Following is an example given in the RSQLite.zip file (Page # 4)
drv <- dbDriver("SQLite")
tfile <- tempfile()
con <- dbConnect(drv, dbname = tfile)
data(USArrests)
dbWriteTable(con, "arrests", USArrests)
On the similar line I am trying to read my data.
Suppose I have a dataframe as given below.
DF = data.frame(X = c("US", "UK", "Canada", "Australia", "Newzealand"), Y = c(52, 36, 74, 10, 98))
drv <- db...