Questions tagged [rsqlite]

An R package for interfacing with SQLite databases.

RSQLite is an package providing an interface to databases. RSQLite uses the interface which is also used by the packages , , , and .

Repositories

Other resources

Related tags

219 questions
0
votes
1 answer

How to know the general column names from uploaded .sql file using RSQLite

I have a .sql file that I am trying to read into SQL database using R package RSQLite. To familiarize myself, first, I looked at R dataset mtcars: mydb <- dbConnect(RSQLite::SQLite(), "") dbWriteTable(mydb, "mtcars", mtcars) str(mydb) The structure…
user2808302
0
votes
1 answer

How to find DB created in SQLite

I'm using this code to load the data from DB ontime into the data frame in R. library(RSQLite) library(DBI) ontime <- dbConnect(RSQLite::SQLite(), dbname = "ontime.sqlite3") from_db <- function(sql) { dbGetQuery(ontime, sql) } from_db("select…
Klausos Klausos
  • 15,308
  • 51
  • 135
  • 217
0
votes
1 answer

RSQLite: how to make not equal statement?

I would like to make the following statement: SELECT fieldA, fieldB FROM tableA WHERE fielb != 'cond' GROUP BY fieldA. This statement works with SQLite Manager but does not work in RSQLite. Could you please help me? Thank you very much :)
dmautrinh
  • 1
  • 1
0
votes
1 answer

error in statement: no such column, but column exists

I'm using RSQLite to combine two tables. I check every single step, but still didn't figure out what went wrong. Here is my script: ol5_H3K4me1_mesc_common<-dbGetQuery(con,"select* from H3K4me1_mesc where H3K4me1_mesc.V2=H3K4me1_mesc_common.V2 and…
lxcfuji
  • 329
  • 1
  • 4
  • 15
0
votes
0 answers

Debugging SQLite R*tree

I have an SQLite database containing an R*tree virtual table. This table is behaving rather oddly and I'm at a loss as to what is wrong. I would appreciate any pointers to aspects I could investigate! > dbGetQuery(con, 'PRAGMA integrity_check') …
ThomasP85
  • 1,624
  • 2
  • 15
  • 26
0
votes
1 answer

RSQLite db created on Mac OSX not inserting data on Windows

I'm really stuck here. I created a SQLite db on the Mac OSX, and now am trying to INSERT data into it on Windows. I'm doing it in R on both platforms, using the RSQLite library. I'm trying to insert the data from data frame x: >…
valuenaut
  • 303
  • 2
  • 4
  • 13
0
votes
0 answers

rpy2 rsqlite Error in loadNamespace(name)

I have correctly installed rpy2 in my windows pc and it seems working correctly. Now I would like to "translate" a R routine in rpy2 but when I try to load specific R libraries I got an error just with the loading of the RSQLite library. This is the…
francesco lc
  • 159
  • 1
  • 5
0
votes
1 answer

How to append to SQLite table in R with autogenerated fields

This is a similar problem to this question, but I do not want the missing columns filled in with NA, because the missing columns have meaningful default values including the primary key. I am trying to append to a SQLite table from R where the…
dayne
  • 7,504
  • 6
  • 38
  • 56
0
votes
1 answer

How to import tab delimited data to sqlite using RSQLite?

I'd like to import a bunch of large text files to a SQLite db using RSQLite. If my data were comma delimited, I'd do this: library(DBI) library(RSQLite) db <- dbConnect(SQLite(), dbname = 'my_db.sqlite') dbWriteTable(conn=db, name='my_table',…
arvi1000
  • 9,393
  • 2
  • 42
  • 52
0
votes
0 answers

Passing na.strings to dbWriteTable

I'm trying to run the following command in R in order to read a local tab-delimited file as a SQLite database: library(RSQLite) banco <- dbConnect(drv = "SQLite", dbname = "data.sqlite") dbWriteTable(conn = banco, …
Waldir Leoncio
  • 10,853
  • 19
  • 77
  • 107
0
votes
1 answer

How to dynamically add data to a dataframe?

I have data I need to clean for each row in a file, and I want to insert the cleaned data in a SQLite3 database. I'm using the RSQLite library which requires a dataframe. Here's the code I trying to get working: # Select feature names for use as…
Edward J. Stembler
  • 1,932
  • 4
  • 30
  • 53
0
votes
0 answers

Join tables SQL command

I have a database with 19 different tables. dbListTables(con) [1] "Sample_86103" "Sample_87024" "Sample_87082" "Sample_88156" "Sample_89090" "Sample_90061" "Sample_90186" [8] "Sample_90204" "Sample_91023" …
sophie-germain
  • 911
  • 4
  • 10
  • 22
0
votes
1 answer

R: RSQLite randomly corrupted databasefiles occur, do I need to close connection?

I load several databasefiles (SQLite) and subject them to a simple query: library("RSQLite") drv <- dbDriver ("SQLite") get.wa2 <- function(file){ con <- dbConnect (drv, dbname = file) table <- dbGetQuery (con, "Select data3 from data where…
Timtico
  • 377
  • 1
  • 4
  • 14
0
votes
1 answer

Error in RSQLite

Trying to use dbWriteTable with the RSQLite driver results in the following error: In value[[3L]](cond) : RAW() can only be applied to a 'raw', not a 'character' My R Script: Con <- dbConnect(SQLite(), dbname="fake.db") dbWriteTable(Con,…
JayCo
  • 784
  • 7
  • 22
0
votes
1 answer

how to connect to a remote server through R?

I'm trying to connect to the server through the SQLite package but can't find the right spelling of database credentials anywhere. Actually I have MySQL and PostgreSQL bases on the server and I found a way to connect to a PostgreSQL it sounds like…
andrew-zmeul
  • 121
  • 1
  • 1
  • 10
1 2 3
14
15