Displaying 20 results from an estimated 4000 matches similar to: "RMySQL and R 2.7.0 - "Error in field.types$row.names : $ operator is invalid for atomic vectors""
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",
2007 Nov 02
0
RMySQL inserting data problem
Hello,
I am trying to insert data in a data.frame into a database table using the RMySQL package
m <- dbDriver("MySQL")
con <- dbConnect(m, host = "blah", user = "blah", password = "blah", dbname = "blah")
proid <- dbGetQuery(con, "select max(processed_data_id)+1 from processed_data")
spot <-
2011 Sep 25
0
RMySQL not running from within batch file
I had a collection of .bat files running R scripts on my computer that were
working perfectly. I then reformatted my computer and now I can't get them
working again. I have spent many days scouring the internet but have not
found a solution to my problem.
I created a simple piece of code named 'test 1.0.R' to try to find the
source of my problem. It contains the following -
2007 Mar 20
1
RMySQL load error
I'm having trouble getting RMySQL to load. I was able to build it and install
it (RMySQL_0.5-11.tar.gz). I was also able to build and install mysql-5.0.37.
I've read many postings about this but have not found a mention of my
particular problem (some closely related). I get the "unable to load shared
library, no such file" error, but all the files do exist, RMySQL.so and
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
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 =
2006 May 23
1
RMySQL on Mac OS 10.4
I have been having trouble getting RMySQL to work on Mac OS 10.4. It
was working fine for me about a year ago but I didn't touch it for a
while and several upgrades of R, MySQL, and OS X later, it is not
working.
I first had the problem that others have been having getting the
error discussed in https://stat.ethz.ch/pipermail/r-sig-mac/2005-
November/002435.html saying that
2007 Mar 21
2
RMySQL *was* working...
List,
Last week with the help of Uwe and some other folks I was able to get RMySQL 0.5-7 compiled against R 2.4.1 and MySQL 5.0.27. It was working fine--I was able to send select queries to the db, put the results in a data frame, and so forth.
Today, dbDriver() threw an error:
> dbDriver(MySQL)
Error in function (classes, fdef, mtable) :
unable to find an inherited method for
2005 Mar 09
1
RMySQL installed but not availalable
I don't use MySQL but I have seen messages like this before. They often have replies which indicate that you need to follow the instructions more closely. I suggest you search the list for these previous posts as I'm sure there is help there, somewhere!
Tom
> -----Original Message-----
> From: Adriano von Sydow [mailto:pdasilva at xtra.co.nz]
> Sent: Thursday, 10 March 2005 5:13
2009 Aug 07
1
RMySQL - overwrite record, not table
Hi, useR-
In RMySQL, how do I overwrite records? (equivalent to "replace" query).
For example, suppose that dat2 is a newer data.frame than dat1.
con <- dbConnect(MySQL())
res <- dbWriteTable(con, "DBname", dat1, row.names=F, append=T, replace=T)
res <- dbWriteTable(con, "DBname", dat2, row.names=F, append=T, replace=T)
This would not update/replace the
2010 Jul 16
1
Troubles with DBI's dbWriteTable in RMySQL
I am feeling rather dumb right now.
I created what I thought was a data.frame as follows:
aaa <- lapply(split(moreinfo,list(moreinfo$m_id),drop = TRUE), fun_m_id)
m_id_default_res <- do.call(rbind, aaa)
print("==========================================")
m_id_default_res
print("==========================================")
ndf <- m_id_default_res[, c('mid',
2003 Dec 10
1
How to start RMySQL
I am a newbie in R and want to use MySQL database. Here is what I have and
done.
R 1.8.0
mysql 4.0.16
Both running in Windows XP. I download the RMySQL.zip from the internet and
used the Packages installer in the RGui to install RMySQL. I also installed
DBI packages. I ran the following and got the error.
> mgr<-dbDriver("MySQL")
Error in dbDriver("MySQL") :
2003 Oct 19
1
Running RMySQL with SuSE 8.2?
Since there doesn't appear to be an RMySQL rpm for SuSE 8.*, does
anyone know if the 7.3 version will work with the SuSE 8.2 rpms of R and
DBI?
The package installs without complaint, but when I try to run
con <- dbConnect(dbDriver("MySQL"),dbname="test")
I get the error
Error in dbConnect(dbDriver("MySQL")) : couldn't find function
2008 Apr 11
1
SQL INSERT using RMySQL
Hi All,
I've finally gotten around to database access using R. I'm happily
extracting rows from a MySQL database using RMySQL, but am having
problems appending rows to an existing table.
What I *want* to do is to append rows to the table, allowing the
database to automatically generate primary key values. I've only
managed to add rows by using
dbWriteTable( con,
2011 Jan 04
2
RSQLite to input dataframe
Dear r helpers,
At first, I apologize 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
2009 Mar 01
0
How to create temporary table in MySQL
Creating a temp table isn't completely intuitive with MySQL 5 and R
2.8..1, but it can be done.
> library(RMySQL)
Loading required package: DBI
> con <- dbConnect(dbDriver("MySQL"), dbname = "foo", user="me",password="secret")
> x<- data.frame(1:10)
> colnames(x) <-c("x")
> dbWriteTable(con, "#x", x,
2007 Jun 06
1
Question: RMySQL bulk load/update one column, dbWriteTable()?
Hi,
I have a question 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
2010 Mar 10
0
RMySQL_0.7-4 core dumped on dbWriteTable
Good Afternoon:
Have an R script that uses RMySQL package.
Everything works great within 32 bit ubuntu linux environment
(/usr/sbin/mysqld: ELF 32-bit LSB shared object, Intel 80386, version
1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15,
stripped).
> mysqlClientLibraryVersions()
5.1.41 5.1.37
50141 50137
Now testing on 64 bit ubuntu linux environment
2007 Sep 20
2
referencing packages?
Hi
I know how to referenc R in a scientific paper - but is there a
standardised way to reference packages?
Thanks
Rainer
--
NEW EMAIL ADDRESS AND ADDRESS:
Rainer.Krug at uct.ac.za
RKrug at sun.ac.za WILL BE DISCONTINUED END OF MARCH
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)
Plant Conservation Unit
Department of Botany
University of Cape Town
Rondebosch 7701
2008 Mar 14
2
Selecting elements in vector
Hi
Consider the following code
> x <- rep(1:13, 13)
> y <- 1:3
I want to select all elements in x which are equal to 1, 2 or 3.
I know that I could use
> sel <- x==y[1] | x==y[2] | x==y[3]
> x[sel]
to obtain the values, but in my analysis, the y-vector is thousands of
elements long.
Is there any way, that I can do that easily?
Thanks
Rainer
--
Rainer M. Krug, Dipl.