Skip to content

sqldf

Manipulate R Data Frames Using SQL

v0.4-12 · Jan 29, 2026 · GPL-2

Description

The sqldf() function is typically passed a single argument which is an SQL select statement where the table names are ordinary R data frame names. sqldf() transparently sets up a database, imports the data frames into that database, performs the SQL select or other statement and returns the result using a heuristic to determine which class to assign to each column of the returned data frame. The sqldf() or read.csv.sql() functions can also be used to read filtered files into R even if the original files are larger than R itself can handle. 'RSQLite', 'RH2', 'RMySQL' and 'RPostgreSQL' backends are supported.

Downloads

CRAN

16.9K

Last 30 days

898th

63.2K

Last 90 days

284.8K

Last year

Trend: -29.9% (30d vs prior 30d)

r2u CRAN

94

Last 30 days

288

Last 90 days

833

Last year

Trend: -2.1% (30d vs prior 30d)

autoCRAN

8

Last 7 days

56

Last 30 days

1

All-time

⚠ Shared name: this package is also shipped elsewhere on openSUSE, so this count is not exclusive to autoCRAN (it is an upper bound).

conda-forge CRAN

367

Last 30 days

1.2K

Last 90 days

5.9K

Last year

Trend: -11.6% (30d vs prior 30d)

bioconda CRAN

9

Last 30 days

25

Last 90 days

185

Last year

Trend: +12.5% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Code

Structure

Lines of code

1,272

Files

19

Compiled share

0%

Has compiled src

No

Language breakdown

R 630 (49.5%)Tests 9 (0.7%)Docs 633 (49.8%)

API

Exported functions

4

Internal functions

0

Testing & CI

Has tests

Yes

Test-to-code ratio

0.01

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

\dontrun example ratio

50%

Roxygen coverage

Has pkgdown

No

NEWS present

No

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

66.7%

Unsafe pattern score

4

Dep constraint coverage

20%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

3.1.0

System requirements

C++ standard

License

GPL-2

License flags

SPDX valid, OSI approved

History

Versions

28

First release

2007-07-21

Latest release

2026-01-30

Avg cadence

36 days

Cold removal rate

Dep drift

7

LOC over versions

v0-1.0: 276 LOCv0-1.1: 292 LOCv0-1.2: 684 LOCv0-1.4: 546 LOCv0-1.5: 632 LOCv0-1.7: 651 LOCv0-2.0: 771 LOCv0-2.1: 772 LOCv0-3.2: 777 LOCv0-3.3: 808 LOCv0.3-4: 833 LOCv0.3-5: 857 LOCv0.4-0: 1,084 LOCv0.4-1: 1,105 LOCv0.4-1.2: 1,111 LOCv0.4-2: 1,125 LOCv0.4-3: 1,153 LOCv0.4-4: 1,199 LOCv0.4-5: 1,212 LOCv0.4-6: 1,283 LOCv0.4-6.1: 1,283 LOCv0.4-6.4: 1,252 LOCv0.4-7: 1,277 LOCv0.4-7.1: 1,277 LOCv0.4-9: 1,362 LOCv0.4-10: 1,346 LOCv0.4-11: 1,275 LOCv0.4-12: 1,272 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (28)

Dependency Network

Dependencies Reverse dependencies gsubfn proto RSQLite DBI chron Fgmutils metevalue smbinning Clustering FIESTA FIESTAutils OnomasticDiversity RSDA RareComb Rprofet WeibullFit dMrs elfgen epicR fdq +13 more reverse deps sqldf

Version History

29 tracked
new 0.4-12 Mar 10, 2026
updated 0.4-12 ← 0.4-11 diff Jan 29, 2026
updated 0.4-11 ← 0.4-10 diff Jun 27, 2017
updated 0.4-10 ← 0.4-9 diff Nov 6, 2014
updated 0.4-9 ← 0.4-7.1 diff Oct 26, 2014
updated 0.4-7.1 ← 0.4-7 diff Mar 14, 2014
updated 0.4-7 ← 0.4-6.4 diff Feb 21, 2014
updated 0.4-6.4 ← 0.4-6.1 diff Mar 27, 2012
updated 0.4-6.1 ← 0.4-6 diff Dec 18, 2011
updated 0.4-6 ← 0.4-5 diff Dec 10, 2011
updated 0.4-5 ← 0.4-4 diff Nov 21, 2011
updated 0.4-4 ← 0.4-3 diff Nov 14, 2011
updated 0.4-3 ← 0.4-2 diff Nov 5, 2011
updated 0.4-2 ← 0.4-1.2 diff Aug 8, 2011
updated 0.4-1.2 ← 0.4-1 diff Jul 22, 2011