Displaying 20 results from an estimated 1100 matches similar to: "have I an actual matrix?"
2006 Mar 06
3
Disconnect all MySQL connections
Hi
I've got the error "cannot allocate a new connection -- maximum of 16 connections
already opened" after I tried to create a new connection to a database. However,
the reason ist, that i did not disconnect previous connections....
I don't know the name of this connections. How can I disconnect this "unknown"
connections and drivers? if I delete all objects, the
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
2009 Dec 30
1
seg-fault... but on what
I got the following after running succesfully through this loop 28 million
times... the loop opens text files in a directory and inserts line by line
into a database...
*** caught segfault ***
address 0xc0000010, cause 'memory not mapped'
Traceback:
1: .getGeneric(f, where, package)
2: getGeneric("coerce", where = where)
3: as(obj, "integer")
4:
2005 May 02
2
RMySQL query: why result takes so much memory in R ?
Hi
I just started with RMySQL. I have a database with roughly 12 millions
rows/records and 8 columns/fields.
From all 12 millions of records I want to import 3 fields only.
The fields are specified as:id int(11), group char(15), measurement
float(4,2).
Why does this take > 1G RAM? I run R on suse linux, with 1G RAM and with
the code below it even fills the whole 1G of swap. I just
2010 Jul 09
2
Compress string memCompress/Decompress
Hello,
I would like to compress a long string (character vector), store the compressed string in the text field of a SQLite database (using RSQLite), and then load the text back into memory and decompress it back into the the original string. My character vector can be compressed considerably using standard gzip/bzip2 compression. In theory it should be much faster for me to compress/decompress
2006 Mar 15
3
"\r" with RSQLite
What am I doing wrong, or is the \r that I'm getting
in the example below a bug?
> a <- (1:10)
> b <- (LETTERS[1:10])
> df <- as.data.frame(cbind(a, b))
>
> df
a b
1 1 A
2 2 B
3 3 C
4 4 D
5 5 E
6 6 F
7 7 G
8 8 H
9 9 I
10 10 J
> library(RSQLite)
> drv <- dbDriver("SQLite")
> con <- dbConnect(drv, dbname = "Test")
2006 Mar 15
3
"\r" with RSQLite
What am I doing wrong, or is the \r that I'm getting
in the example below a bug?
> a <- (1:10)
> b <- (LETTERS[1:10])
> df <- as.data.frame(cbind(a, b))
>
> df
a b
1 1 A
2 2 B
3 3 C
4 4 D
5 5 E
6 6 F
7 7 G
8 8 H
9 9 I
10 10 J
> library(RSQLite)
> drv <- dbDriver("SQLite")
> con <- dbConnect(drv, dbname = "Test")
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?
2012 Mar 24
2
RC / methods package
(I think this is being caused by the new methods package in RC.)
In the RC (March 24) some of my packages are generating a Note
Note: Method with signature "MySQLConnection#integer" chosen for
function "coerce",
target signature "TSMySQLConnection#integer".
"dbObjectId#integer" would also be valid
This is coming from a call to dbGetQuery() in package
2012 Feb 02
9
sqldf for Very Large Tab Delimited Files
Hi All,
I have a very (very) large tab-delimited text file without headers. There
are only 8 columns and millions of rows. I want to make numerous pieces of
this file by sub-setting it for individual stations. Station is given as in
the first column. I am trying to learn and use sqldf package for this but am
stuck in a couple of places.
To simulate my requirement, I have taken iris dataset as an
2020 Oct 03
1
Lahman Baseball Data Using R DBI Package
The double quotes are required by SQL if a name is not of the form
letter-followed-by-any-number-of-letters-or-numbers or if the name is a SQL
keyword like 'where' or 'select'. If you are doing this from a function,
you may as well quote all the names.
-Bill
On Fri, Oct 2, 2020 at 6:18 PM Philip <herd_dog at cox.net> wrote:
> The \?2B\? worked. Have no idea why. Can
2011 Feb 28
1
Data type problem when extract data from SQLite to R by using RSQLite
Hi there,
When I extract data from SQLite to R, the data types (or modes) of the
extracted data seems to be determined by the value of the first row.
Please see the following example.
When I put the missing values first, the column extracted is of the
mode character.
> str(dbGetQuery(sql.industry,
+ "select pya_var from annual_data3
+ order by
2008 May 12
1
Insert a recorde into a table using SQL
Dear list,
I want to insert a recorde into a SQLite table by dbGetQuery(), but
there is a problem when the value contains quotation mark.
> dd<-data.frame(txt=c("having both ' and \" in character.","OK"))
> library(RSQLite)
Loading required package: DBI
> con<-dbConnect(dbDriver("SQLite"),":memory:")
>
2005 Jan 13
2
R, postgresql, windows & bsd
I usually work with R on a windows querying data through RODBC from a postgresql
db on a freebsd machine on my offcie lan.
Now I have the chance to use R also on a linux gentoo client box and to
connect to the same db.
I know that I can install the unixodbc stuff and stick to RODBC, BUT my
question is:
Is there any more 'linuxish' way of querying a postgresql server from a
client?
2020 Oct 08
0
Lahman Baseball Data Using R DBI Package
Hi Philip,
You've probably realized by now that R doesn't like column names that
start with a number. If you try to access an R-dataframe column named
2B or 3B with the familiar "$" notation, you'll get an error:
> library(DBI)
> library(RSQLite)
> con2 <- dbConnect(SQLite(), "~/R_Dir/lahmansbaseballdb.sqlite")
> Hack12Batting <-
2006 Oct 07
1
Request to open up getConnection to embedded interface
Hello all,
I would like to request that getConnection() and the struct Rconn
declarations be added to the R embedded interface. Here's why.
It's common in CGI scripts for web applications to direct stdin, stdout,
and stderr map to reading from the browser, writing to the browser, and
writing to a web log file respectively; very nice and neat. However,
things get a little hairy once
2020 Oct 08
1
Lahman Baseball Data Using R DBI Package
This is really a feature of SQL, not R. SQL requires that you double quote
column names that start with numbers, include spaces, etc., or that are SQL
key words. E.g.,
> d <- data.frame(Order=c("sit","stay","heel"),
Where=c("here","there","there"), From=c("me","me","you"))
>
2006 Dec 20
1
DBI + ROracle problem with parser ?? (PR#9424)
Full_Name: Christian Hoffmann
Version: 2.4.0
OS: Win 2000
Submission from: (NULL) (193.134.202.252)
Database queries using the combination DBI + ROracle are handicapped by
quirks in the pipeline between the textual representation of the query
and the database engine Oracle. Comments and linefeed at start are
interfering:
dbGetQuery(conn, query):
works:
dbGetQuery(conn, "select *
2009 Apr 03
1
Functions Accessing Databases
Hello,
I'm accessing a MySQL database from inside R and had a problem with a function. In the database, there is data from years 1985 to 2007 that I would like to retrieve. I can easily get the data from one year by the following:
info1985=dbGetQuery(con, statement='the SQL query')
Inside the statement, I have a column that is set to the desired year (e.g. table.column=1985) through
2017 Jan 25
2
Enconding
Hola.
Tengo un problema incómodo.
En el servidor de BD, existe esta tabla:
SELECT * FROM motivodebito
1;"Débito presentado extemporáneamente."
2;"Corresponde la aplicación del nomenclador GCBA vigente al momento de la
prestación."
3;"No registra convenio de prestaciones vigente al momento de la
prestación."
4;"Débito presentado sin documentación ni