similar to: How to dbReadTable() only a limited number of rows? (RMySQL)

Displaying 20 results from an estimated 900 matches similar to: "How to dbReadTable() only a limited number of rows? (RMySQL)"

2010 Feb 13
4
Labels on a pyramide
I am using pyramid.plot() from the plotrix package. I have something like this ############################################ xy.pop<-dados$masfr xx.pop<-dados$femfr #agelabels<-dados$femlab xycol<-color.gradient(c(0,0,0.5,1),c(0,0,0.5,1),c(1,1,0.5,1),11) xxcol<-color.gradient(c(1,1,0.5,1),c(0.5,0.5,0.5,1),c(0.5,0.5,0.5,1),11) xylab<-dados$maslab xxlab<-dados$femlab
2010 Jan 25
1
RMySQL Append data.frame to table
I have a data.frame obj with 5 columns whose colnames match the fields in my "contact" table. The only other field my MySQL table has is an id field which is the PK and is set to auto increment. I'd like to load this data.frame using something like: dbWriteTable(con, "contact", dat, append=TRUE) However, I get this error: Error in mysqlExecStatement(conn, statement,
2010 Jan 12
1
FW: Problems connecting with MySQL using odbcDriverConnect (RODBC package) on Linux
I think I figured this out. I should not have put the Driver name in braces. Changing it from {MySQL} to MySQL seems to work. -----Original Message----- From: Marcus, Jeffrey Sent: Tuesday, January 12, 2010 6:09 PM To: 'r-help at r-project.org' Subject: Problems connecting with MySQL using odbcDriverConnect (RODBC package) on Linux I am sure I'm doing something wrong here but not
2010 Mar 27
7
large dataset
Hi I have a question, as im not able to import a csv file which contains a big dataset(100.000 records) someone knows how many records R can handle without giving problems? What im facing when i try to import the file is that R generates more than 100.000 records and is very slow... thanks a lot!!!
2012 Nov 02
1
can not read table in dbReadTable
> tbs<-dbListTables(con) > > tbs [1] "lowend" "time" "week30" "week33" "week39" "week42" > my.data.copy <- dbReadTable(tbs, "week42") Error in function (classes, fdef, mtable) : unable to find an inherited method for function "dbReadTable", for signature "character",
2009 Oct 10
7
SPSS long variable names
Hello guys I am new to this list and for R too. I am wondering if there is a patch for the SPSS reading code on the foreign package, in order to be able to read long variable names. Right now read.spss() just trunc the names to 8 characters. Or if someone could help me on other way: I have to process everyday a lot of SPSS Syntax Files and Dat files that come from one system that can only export
2011 Jul 01
1
RMySQL, RODBC, dbReadTable and ISO-8859-1 (Spanish data)
Hello R users, I am reading data into R from RMySQL or SQLite databases which are in Spanish language. I am using RMySQL library and function dbReadTable but I could not get characters with ñ and tilde, instead R does put ?. In the past I could manage it modifying the R options as (using windows): op <- options() op$encoding <- "iso-8859-1" options(op) but now in ubuntu it did
2012 Nov 06
0
How to read all table in r using dbreadTable, autimatically read in whenever I save new table in SQLite db
HI, I got the problem. I use the following query to read table individually, how can I read all tables autimatically rather than typing "week42" "week33" in dbReadTable? library(RSQLite) library(sqldf) drv <- dbDriver("SQLite") con<-dbConnect(drv, "sqlite.db") dbListTables(con) #dbRemoveTable(con, "week39") dbDisconnect(con)
2011 Jun 25
2
Access R functions from web
I need a way to send R objects and call R functions from web. Is there any project close or similar to that? I want to be able to send an HTTP rquest from an existing application with some data. And obtain a plot from R. Thanks in advance Caveman [[alternative HTML version deleted]]
2010 Aug 10
2
Replacing characters
Hello guys! May be I am lazy but I need to replace a character like \ or ' or to escape them in a character vector to write a SQL statement. How can I do that? Caveman [[alternative HTML version deleted]]
2011 Jun 26
1
RJDBC and multiple classpaths
Corect me if this is not the right place to post this. I have a mdbdriver.jar (to access an MSAccess file) under Linux. I bought the license from http://www.csv-jdbc.com/ guys. The driver work fine when tested with DBVisualizer or another JDBC thing. The problem is that driver needs 3 other more jar files to work. Under R I have tried this and does not work: > library(RJDBC) Loading required
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 =
2004 Mar 05
1
Slow reshape from 5x600000 to 6311 x 132
I have a dataset that's a few hundred thousand rows from a database (read in via dbreadTable). The database is like: > str(measures) `data.frame': 609363 obs. of 5 variables: $ vih.id : int 1 2 3 4 5 6 7 8 9 10 ... $ vi.id : int 1 2 3 4 5 6 7 8 9 10 ... $ vih.value: chr "0" "1989" "0" "N/A" ... $ vih.date : chr
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-mode
2005 Feb 01
2
How to get a table of MySQL database as a matrix variable in R
It seems that the dbReadTable() method provided by RMySQL could not get rid of the headers, neither the index column... So 1. Can I use read.table() method to get a table of MySQL database? >From the help document the argument of 'file' of read.table() method could be a connection... 2. How can I obtain a matrix from the database table contains all elements except the headers and the
2002 Dec 18
1
A little problem handling logicals in RMySQL under R1.6.1
There is a little problem in handling logicals in RMySQL: # here is the MySQL connection > con <MySQLConnection:(1816,0)> # here is the data frame > print(a<-data.frame(x=c(TRUE,FALSE),y=c(FALSE,TRUE))) x y 1 TRUE FALSE 2 FALSE TRUE # as promised, the two data frame columns are identified as logicals and # the field types are set to tinyint > field.types <-
2007 Oct 01
2
xyplot
Hello, I am calling the following code with the loop! It makes 3 out graphs but empty! COuld you help me plase on that? Thank you in advance z1 <- dbConnect(MyData, "something", "A1", "A2") for (tt in c("xyz", "abc", "m1")) { message(paste("Here", tt, "!!!")) mydata <- dbReadTable(z1, tt)
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, ...)
2012 Mar 27
1
RSqlite UPDATE command problem
All: I am using RSqlite and want to be able to update individual values in a record, such as with this simple example: library(RSQLite) drv<-dbDriver("SQLite") con<-dbConnect(drv,"test.db") my.data<-data.frame(countries=c("US","UK","Canada","Australia","NewZealand"),vals=c(52,36,74,10,98))
2012 Nov 06
1
how Can make function for selecting the products
HI. I make this code: getdata<-function('a','b','c' ,'d','e','f'){ drv <- dbDriver("SQLite") con<-dbConnect(drv, "sqlite.db") lt<-dbListTables(con) myf<-data.frame(NULL) for (i in 1:length(lt)) { myfile<-dbReadTable(con,lt[i]) myfile1<-myfile[-c(14:44)] myfile1$MODEL<-gsub(" ",