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

Importing FIles with Extension .sqlite into R - and reading header names

I have recently started using SQLite to store my raw biological data (I have several forms of raw data output and find it is a very useful way of querying and linking tables relating to the same trial). I would now like to pull out the raw data from…
0
votes
0 answers

Import RSQLite in R package

I am trying to add RSQLite package to Imports instead of Depends in my package. In DESCRIPTION I have: Imports: sqldf, RPostgreSQL, RSQLite In NAMESPACE there is: import(RPostgreSQL) import(RSQLite) import(sqldf) But then when I load…
Tomas Greif
  • 21,685
  • 23
  • 106
  • 155
-1
votes
2 answers

Safely parametrize WHERE ... IN lists for SQL queries in R

library(DBI) library(RSQLite) library(dplyr) con <- dbConnect(RSQLite::SQLite(), ":memory:") iris_id <- iris |> mutate(id = row_number()) dbWriteTable(con, "iris_id", iris_id) params <- list(id = c(5,6,7)) q <- "SELECT COUNT(*) FROM iris_id…
meow
  • 925
  • 7
  • 22
-1
votes
1 answer

How to change string to date-time format in sql/r?

I am trying to find the earliest and latest timestamp of a text message. I know I have to change the following column to date format to be able to order by: Fri May 26 17:30:01 +0000 2017 Fri May 26 17:30:05 +0000 2017 Fri May 26 17:30:05 +0000…
-1
votes
1 answer

R does not read tables from SQLite

Can you help me? Tell me where the error is. I am trying to pull tables from SQLite to R. At the beginning, he did not read the DB, but then he opened it, but he still does not see the table. > library('RSQLite') > require(SQLite) …
-1
votes
1 answer

SQL data displays 1 on barchart

I am four hours into R programming. When I create a barchart from a SQL Script I get all 1's for the bar values. Here are my steps: states =dbGetQuery(con, "SELECT state, COUNT(*) FROM leads GROUP BY state") when I do view(out) it give me this: I…
ja11946
  • 177
  • 1
  • 2
  • 13
-2
votes
1 answer

R - sqldf - update query

I am currently working on a project where I need to update variables in my dataframe conditionally. I found the simplest way to do this would be to use sqldf/RSQLite. I have tried several code combinations so far and this is the one that I've got…
johubb
  • 152
  • 11
-3
votes
2 answers

Syntax error when selecting specific rows for SQL (in R, using RSQLITE)

I'm trying to select some rows and columns from bigquery data on help requests in NYC. I want to select five columns - date request created, city where the request was made, the agency that received the request, etc. First, I managed to select the…
halo09876
  • 2,725
  • 12
  • 51
  • 71
-6
votes
1 answer

Fetch the time between two timestamps in R

Please run the code below: The "patients$time" column gives the timestamp. I want to fetch all the records between two times say first row value "2017-01-02 11:41:53" and 226th row value "2017-08-07 09:06:07". I want to basically get all the records…
Ashmin Kaul
  • 860
  • 2
  • 12
  • 37
1 2 3
14
15