Displaying 20 results from an estimated 6000 matches similar to: "RMySQL insert statements?"
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
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
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,
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
2009 Apr 28
1
Processing POST data with brew?
Heya Folks,
I've got to process a form that contains variable series of values,
which i want to collect into a vectors.
Say the first series has ten values, with id's ranging from X1 to X10,
currently i process them in the following hardcoded manner:
x1 <- c(as.numeric(POST$X1), as.numeric(POST$X2), as.numeric(POST$X3),
as.numeric(POST$X4), as.numeric(POST$X5), as.numeric(POST$X6),
2006 Jun 13
2
Numerical print format and loading with RMySQL
Hi
I'm new to R and have been resisting posting to the list thus far,
but I think I've exhausted my work around options.
I'm having a few problems with RMySQL and/or it's underlying packages.
I'm doing a very simple vsn transformation on large datasets, using
RMySQL to retrieve the data for a DB.
My first problem was that I could not get the RMySQL package to write
2011 Feb 09
2
Insert variable in RMySQL-Statement
Dear list,
I'm working with a MySQL-Table and would like to extract selected ids that are stored in a vector:
Ids <- c(1,2,3)
How do I insert this variable in a for loop like this:
For (a in values) {
Temp <- dbGetQuery(con,
"select * from db
Where id = <ID>";)
}
My problem is to split the select-statement and insert the current id. How can I handle this problem?
2002 Oct 16
5
Database newbee problem...
Hi all,
This is a potentially very stupid question about MySQL <-> R
interaction, but I have not been able to solve it.
I'm just trying to connect R to my MySQL databse, and gets this:
> library(RMySQL)
Loading required package: methods
> m <- dbDriver("MySQL")
> con <- dbConnect(m,group="testdb")
Process R segmentation fault at Wed Oct 16 07:04:30
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 =
2007 Jan 03
2
loading data and executing queries with R and Mysql
Hello everyone,
I have a problem when I execute queries using R 2.3.1 and MySql server 5.0.
What I do: I load data in different csv files (every file represents a
particular temporal step of a simulation) using Mysql query "load data" with
RMySQL command DbSendQuery (but the same problem there is also using
DbWritetable). Then I use a function where I have a lot of queries that
interact
2001 Mar 19
3
generic database access methods
I've been putting together a package that defined generic methods for
database access. The packages is called "Rdbi." It borrows as much as
possible from existing database packages / proposals. I'd like to start
a discussion about the proposed interface. Here's what I've come up
with so far:
#
# Rdbi: connectionMethods.R
#
dbConnect <- function(dbObj, ...)
2009 May 06
2
rmysql query help
R HELP,
I am trying to use an R script to connect to a mysql database. I am
having a problem using a variable in the where clause that contains a
"space" in its value.
If I include the variable inside the quotes of the query - i think it is
searching for the name of the variable in the database and not the value
of the variable.
If I put it outside the quotes, then it complains
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
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
2003 Nov 11
0
Installing and Loading RMySQL on OS X 2.8
Hello,
I have trouble installing and loading the RMySQL package on OS X 2.8.
The package seems to install from source fine (using R package manager
from within the R environment). I have the following error when I try
to load the package:
loading package: RMySQL
Error in dyn.load(x, as.logical(local), as.logical(now)) :
unable to load shared library
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",
2004 May 24
1
RMySQL problem
Hi,
I'm using R 1.9.0 with RMySQL 0.5-4 and MySQL 3.23.55 on a suse 8.2 box.
I have a simulation study and (as usual for newbies in simulation, I
guess) I have a lot of data that I want to store in MySQL. I want to
write an R script that reads data from RData files and writes it to a
MySQL database.
I read some R documents (R Data Import/Export and DSC papers) but I'm
finding
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',
2010 Jan 27
2
RMySQL - Bulk loading data and creating FK links
I have a table (contact) with several fields and it's PK is an auto
increment field. I'm bulk loading data to this table from files which if
successful will be about 3.5million rows (approx 16000 rows per file).
However, I have a linking table (an_contact) to resolve a m:m
relationship between the an and contact tables. How can I retrieve the
PK's for the data bulk loaded into
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 <-