Displaying 20 results from an estimated 2000 matches similar to: "Searching for a string in RSQLite"
2010 Aug 12
2
How to building my own datafile
Hi folks,
I'm prepared building my own datafiles, simple file at start, for testing
wondering how to process? Which software will be used,
MySQL/MS-SQL/MS-Excel/Open Office-Calc etc?
On searching I found r-cran-rmysql on Ubuntu repo.
Further searching I found;
RMySQL: R interface to the MySQL database
http://cran.r-project.org/web/packages/RMySQL/index.html
Whether install the above
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:")
>
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 Dec 18
1
The RSQLite version of dbGetQuery drops colums
Hi all,
I just noticed (the hard way of course) that when a query returns 0
rows, the columns in the resulting data.frame get dropped as well. See
the following example code (where conn is an active connection to an
SQLite db):
> dbGetQuery(conn, "select 1 as hey, 2 as ho where 1")
hey ho
1 1 2
> dbGetQuery(conn, "select 1 as hey, 2 as ho where 0")
data frame
2010 Nov 25
1
RODBC
Hi,
I am running the RODBC examples form the help guide. I am trying to
UPDATE a table in an Access data base but I am having an error.
library(RODBC)
library(termstrc)
path = getwd()
setwd(getwd())
dbName = "data.mdb"
pathdbname = paste(path,"/",dbName,sep="")
accesChannel = odbcConnectAccess(pathdbname, uid = "", pwd = "")
2013 Jul 15
2
Serialize data.frame to database
Dear R-Users,
I need a very fast and reliable database solution so I try to serialize a data.frame (to binary data) and to store this data to an SQLite database.
This is what I tried to do:
library(RSQLite)
con <- dbDriver("SQLite")
db <- dbConnect(con, "test")
dbSendQuery(db, 'CREATE TABLE frames("simID" INT, "data" BLOB)')
data.bin <-
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
2009 Nov 30
1
RSQLite does not read very large values correctly
Hello,
I am trying to import data from an SQLite database to R.
Unfortunately, I seem to get wrong data when I try to import very large
numbers.
For example:
I look at the database via SQLiteStudio(v.1.1.3) and I see the following
values:
OrderID Day TimeToclose
1 2009-11-25 29467907000
2 2009-11-25 29467907000
3 2009-11-25 29467907000
Now I run this R Code:
>
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")
2009 Mar 30
1
Importing csv file with character values into sqlite3 and subsequent problem in R / RSQLite
Dear all,
I'm trying to import a csv file into sqlite3 and from there into
R. Everything looks fine exepct that R outputs the character values in
an odd fashion: they are shown as "\"CHARACTER\"" instead of
"CHARACTER", but only if I show the character variable as a
vector. Does someone know why this happens? Below is a sample
code. The first part is written in
2008 Jan 13
1
What is the 'scale' in princomp() function?
Dear R users,
When I tried to use princomp() from stats packages to do Principal
Components Analysis, I am not very clear what is the "scale".
And the scores are different from "PROC PRINCOMP" procedure from SAS.
Using the example data from this package:
restpc <- princomp(USArrests, cor = TRUE)
> restpc$scale
Murder Assault UrbanPop Rape
4.311735 82.500075
2003 Apr 02
1
RODBC sqlSave problem.
Dear list,
Being new to both the postgres database, ODBC and the RODBC interface, I
am somewhat confused by some of the problems I am experiencing trying to
connect R to the database.
Whai I am trying is basically the example part of the help file for the
sqlSave function:
> library(RODBC)
> odbcConnect("theodor") -> channel
> data(USArrests)
> sqlSave(channel,
2010 Dec 10
1
help with RSQLite adding a new column
I'm new to using sql so I'm having difficulties (and worries) in adding a
new column of data to a table I have. Its a very large file (around 5 Gb)
which is why I'm having to use SQL
I have a table with variables ID, IDrec and IDdes and the variables IDrec
and IDdes give a mapping of some other values but the other values are
associated with the ID variable (think of IDrec and IDdes
2009 Apr 30
1
Creating datasets in packages
I am developing an R package which includes datasets. The build and
install works correctly. However, when I access the dataset
("BowRiver"), I get:
> data(BowRiver)
> BowRiver
Error: object "BowRiver" not found. However, I can access the dataset
from
> data
Example R datasets (such as USArrests) are loaded and can be accessed by
the dataset name:
>
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))
2004 Nov 03
2
Princomp(), prcomp() and loadings()
In comparing the results of princomp and prcomp I find:
1. The reported standard deviations are similar but about 1% from
each other, which seems well above round-off error.
2. princomp returns what I understand are variances and cumulative
variances accounted for by each principal component which are
all equal. "SS loadings" is always 1.
3. Same happens
2017 Aug 09
1
arithmetic with zero-column data.frames
So as often there is more to it than you first think.
Let's consider this an RFC (for experienced long time R users) :
>>>>> Martin Maechler <maechler at stat.math.ethz.ch>
>>>>> on Wed, 9 Aug 2017 10:45:56 +0200 writes:
>>>>> William Dunlap via R-devel <r-devel at r-project.org>
>>>>> on Tue, 8 Aug 2017 11:59:45
2005 Sep 16
1
About princomp
Hi,
I run the example for princomp for R211
I got the following error for biplot
> ## The variances of the variables in the
> ## USArrests data vary by orders of magnitude, so scaling is appropriate
> (pc.cr <http://pc.cr> <- princomp(USArrests)) # inappropriate
Erreur dans cov.wt(z) : 'x' must contain finite values only
> princomp(USArrests, cor = TRUE) # =^=
2013 Feb 12
0
How do I solve a disk I/O error with RSQLite?
Hi there,
I had an error when using RSQLite. My code and the error message are
the following:
> dbGetQuery(sql.dispersion,
+ "create table monthly_data_temp as
+ select a.*, b.industry
+ from monthly_data as a left join
+ siccd_industry_ff49 as b
+ on a.siccd = b.siccd
+ order by permno, date")
Error