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
1
vote
0 answers

rhandsontable: save changes to sqlite data base via shiny

I'd like to save the changes of rhandsontable via shiny in the sqlite database but it doesn't work. I create and save the data base: library(collapse) library(DBI) library(shiny) library(RSQLite) library(rhandsontable) # Create sqlite base and…
kokolet
  • 11
  • 1
1
vote
1 answer

Support of nanotime by RSQLite

I am looking into what is required to support nanotime objects in RSQLite queries. They are just integer64 wrappers. Here is an example: con <- DBI::dbConnect(RSQLite::SQLite(), ":memory:", bigint = "integer64") ts <-…
Davor Josipovic
  • 5,296
  • 1
  • 39
  • 57
1
vote
2 answers

DST issue converting date through epoch time

I use following code to extract the date from the epoch date: dbGetQuery(db,"SELECT datetime(started_at, 'unixepoch', 'utc','-4 hours') FROM biketransactions limit 3") The data is recorded in New York, but New York is not always 4 hours behind the…
Cindy Burker
  • 117
  • 9
1
vote
1 answer

R trouble finding the table in sql database from a function in DBI package, using with RSQLite and dbplyr

I have been studying a YouTube video from Andrew Couch about RSQLite, DBI, and dbplyr packages. Here is the link. I'm running into an error, however, and I'm not sure what is happening. The YouTube video is a good video but I don't think AC is…
hachiko
  • 671
  • 7
  • 20
1
vote
0 answers

RSQLite: Read Blob from MBTiles files

I have an MBTiles file, which I can read with RSQLite like so: > dbGetQuery(con, "select * from tiles limit 10") zoom_level tile_column tile_row tile_data 1 8 40 156 blob[26.45 kB] 2 8 40 159…
Kyouma
  • 320
  • 6
  • 14
1
vote
1 answer

Extracting a column using $ sign return Null

The following SQLite database is a tiny replica of a huge database that i'm working on. library(RSQLite) library(inborutils) library(tibble) library(dplyr) library(dbplyr) col1 <- c(1:20) col2 <- c("A", "B", "C", "D", "E", "F", "G", "H", "I", "J",…
DreamNet
  • 627
  • 3
  • 8
  • 24
1
vote
1 answer

I am trying to instal RSQLite but I am getting following error

install.packages('RSQLite', repos='http://cran.us.r-project.org') Installing package into ‘C:/Users/Ajmal/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) There is a binary version available but the source version is later: binary…
1
vote
1 answer

Create dynamic SQL query depending on user input in R Shiny App

I have an Shiny App where User can filter a SQL Database of Movies. So far, you can only filter by different countries. con <- dbConnect(RSQLite::SQLite(), 'Movies.db') movies_data <- dbReadTable(con, 'Movies') ui <- fluidPage( fluidRow( …
DWA
  • 25
  • 3
1
vote
1 answer

Using a list of IDs to combine SQL tables into a data frame in R

I have a list of IDs that are not associated with any actual data. I have a SQL database that has a table for each of these IDs, and those tables have data that I would like to combine together into one large data frame based on the list of IDs that…
John Huang
  • 845
  • 4
  • 15
1
vote
1 answer

Writing date and time into SQL database in R

I am trying to create a SQL database using a data set with a column that has both date and time included in it. The problem that I am running into is when the data is written into a SQL database, and read back into R the date and time column end up…
John Huang
  • 845
  • 4
  • 15
1
vote
2 answers

Can't Insert dataframe to SQLite table when column names different dbWriteTable

I am using an SQLite database in R. To insert a data frame into an SQLite table using dbWriteTable from DBI, it seems that I need to have the same column names in the data frame as those in the table. I was using sqldf and this was not a condition,…
1
vote
1 answer

Coerce dbGetQuery to produce strings

I have a SQL database with two tables. In one all of the data is stored as TEXT, while the other stores columns as TEXT, DOUBLE, TIME, INT, DATE, etc. (I checked using dbDataType(ANSI(), data)) When I try to join the two in R, though, I get the…
1
vote
1 answer

Connect to SQLite db without changing wd

Is there a way to specify a connection path to an SQLite database from R without re-setting my wd? I've looked through the DBI::dbConnect() and RSQLite::SQLite() documentation, but it is still not clear to me how (or if) this can be accomplished. So…
CzechInk
  • 443
  • 2
  • 13
1
vote
1 answer

Update SQLite version used by RSQLite

I'm building a database in SQLite using R and Rmarkdown. Both the CRAN and development RSQLite packages are using SQLite version 3.30.1. Recently (1/2020) SQLite released v 3.31.1 which supports the creation of generated columns within tables. …
1
vote
0 answers

I cannot run RSQLite in R

I am trying to load RSQLite in my R installation using Home-brew on a Mac OS Catalina with no success. R version 3.6.3 (2020-02-29) -- "Holding the Windsock" Copyright (C) 2020 The R Foundation for Statistical Computing Platform:…
RodLL
  • 110
  • 8