I have a large csv file containing umlauts (Ä/Ö) that I need to transform to a RSQLite database to analyse in parts using dplyr. However, when I read in data from the database, the umlauts do not reproduce correctly. Ä becomes and Ö becomes…
I try to use dplyr's mutate() function on a SQL like database. I don't understand why it work sometimes and doesn't other times.
Here is one example with the stantard example from…
Programming SQL-specific stuff in Python I've got used to always use parameter substitution when executing plain SQL queries, like this:
# Never do this -- insecure!
symbol = 'RHAT'
c.execute("SELECT * FROM stocks WHERE symbol = '%s'" % symbol)
#…
I'm trying to store large list objects created in R to an SQLite database via RSQLite. Since These list objects contain several 2d and 3d matrices, I'd like store them as individual entries. I read serializing these and storing them as blobs does…
I have a CSV file that is structured as follows:
Date (mm/dd/yyyy)
Experiment Number (1)
Header (several lines of text)
colN1 colN2 colN3 ...
data11 data12 data13 ...
data21 data22 data23 ...
...
Repetitive up to experiment 52. Now, the number…
I attempt to write a data.frame with 285,476 rows and 17 columns into the SQlite database using dbWriteTable from RSQLite package. I get a following error:
Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
I have…
Here is a snippet from data encoding in R memory. The CSV file was read with encoding "Latin-1" using data.table::fread.
As this piece suggests, the data is stored with different encodings, which is not desirable because I'll leave the data in a…
I'm hitting this weird database connection issue with RSQLite that I need to work around somehow. I have documented how to reproduce this issue at the link below:
https://github.com/rstats-db/RSQLite/issues/101
> dbSendQuery(db, "create table hfp…
I have been observing strange behavior from DBI:::dbWriteTable which seems to be connected to the occurrences of single quotes in input fields of the files I am attempting to read in.
Here is a minimally reproducible example:
library(RSQLite)
con <-…
I had this function I used to load a SQLite table
sqLiteConnect <- function(database, table) {
library(DBI)
library(RSQLite)
con <- dbConnect("SQLite", dbname = database)
query <- dbSendQuery(con, paste("SELECT * FROM ", table, ";", sep=""))…
I'm trying to create a workflow where I
Create a SQLite database using R
Load some (potentially large -- larger than can fit in memory) CSV files into the database as tables
Do analysis with dplyr
It seems like something below is very close to…
I have a table in a SQLite database DB that I want to import in R. Yet one column integer of table is a SQLite integer datatype that might assume values > 2^31-1, then more than what supported by the R integer dataype. Yet RSQLite will proceed to…
I have an SQLite database connection to a database file. I want to extract some data from one of the tables, do some processing in R and then create a temporary table on the same connection from the processed data. It needs to be a temp table…
Is there some simple way, either on the SQL side or on the R side, to append a data.frame to an existing table that has more columns? The missing columns should just be filled in with NAs. Bonus points if it gracefully handles table 2 having more…
I am using RSQLite package for database operations. For selecting data from table, I used the following code, but I got only 500 rows. Actually this table contains 1200+ rows for that query. What is the cause of this problem?
library('RSQLite')
lite…