Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
✓Committers with academic emails
3 of 43 committers (7.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.9%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
A DBI-compliant interface to PostgreSQL
Basic Info
- Host: GitHub
- Owner: r-dbi
- License: other
- Language: R
- Default Branch: main
- Homepage: https://rpostgres.r-dbi.org
- Size: 13.8 MB
Statistics
- Stars: 336
- Watchers: 23
- Forks: 80
- Open Issues: 27
- Releases: 20
Topics
Metadata Files
README.md
RPostgres
RPostgres is an DBI-compliant interface to the postgres database. It's a ground-up rewrite using C++ and cpp11. Compared to RPostgreSQL, it:
Has full support for parameterised queries via
dbSendQuery(), anddbBind().Automatically cleans up open connections and result sets, ensuring that you don't need to worry about leaking connections or memory.
Is a little faster, saving ~5 ms per query. (For reference, it takes around 5ms to retrieve a 1000 x 25 result set from a local database, so this is decent speed up for smaller queries.)
A simplified build process that relies on system libpq.
Installation
```R
Install the latest RPostgres release from CRAN:
install.packages("RPostgres")
Or the the development version from GitHub:
install.packages("remotes")
remotes::install_github("r-dbi/RPostgres") ```
Discussions associated with DBI and related database packages take place on R-SIG-DB. The website Databases using R describes the tools and best practices in this ecosystem.
Basic usage
```R library(DBI)
Connect to the default postgres database
con <- dbConnect(RPostgres::Postgres())
dbListTables(con) dbWriteTable(con, "mtcars", mtcars) dbListTables(con)
dbListFields(con, "mtcars") dbReadTable(con, "mtcars")
You can fetch all results:
res <- dbSendQuery(con, "SELECT * FROM mtcars WHERE cyl = 4") dbFetch(res) dbClearResult(res)
Or a chunk at a time
res <- dbSendQuery(con, "SELECT * FROM mtcars WHERE cyl = 4") while(!dbHasCompleted(res)){ chunk <- dbFetch(res, n = 5) print(nrow(chunk)) }
Clear the result
dbClearResult(res)
Disconnect from the database
dbDisconnect(con) ```
Connecting to a specific Postgres instance
```R library(DBI)
Connect to a specific postgres database i.e. Heroku
con <- dbConnect(RPostgres::Postgres(),dbname = 'DATABASE_NAME', host = 'HOST', # i.e. 'ec2-54-83-201-96.compute-1.amazonaws.com' port = 5432, # or any other port specified by your DBA user = 'USERNAME', password = 'PASSWORD')
```
Design notes
The original DBI design imagined that each package could instantiate X drivers, with each driver having Y connections and each connection having Z results. This turns out to be too general: a driver has no real state, for PostgreSQL each connection can only have one result set. In the RPostgres package there's only one class on the C side: a connection, which optionally contains a result set. On the R side, the driver class is just a dummy class with no contents (used only for dispatch), and both the connection and result objects point to the same external pointer.
Please note that the 'RPostgres' project is released with a Contributor Code of Conduct. By contributing to this project, you agree to abide by its terms.
Owner
- Name: r-dbi
- Login: r-dbi
- Kind: organization
- Website: https://r-dbi.org/
- Repositories: 25
- Profile: https://github.com/r-dbi
R + databases
GitHub Events
Total
- Issues event: 8
- Watch event: 5
- Delete event: 27
- Issue comment event: 39
- Push event: 120
- Pull request review event: 5
- Pull request review comment event: 4
- Pull request event: 75
- Fork event: 2
- Create event: 40
Last Year
- Issues event: 8
- Watch event: 5
- Delete event: 27
- Issue comment event: 39
- Push event: 120
- Pull request review event: 5
- Pull request review comment event: 4
- Pull request event: 75
- Fork event: 2
- Create event: 40
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Kirill Müller | k****r@m****g | 1,057 |
| hadley | h****m@g****m | 103 |
| Kirill Müller | k****r@i****h | 81 |
| Jeroen Ooms | j****s@g****m | 54 |
| antonov548 | a****8@g****m | 47 |
| Guillaume Horel | g****l@g****m | 23 |
| Daniel Possenriede | p****e@g****m | 17 |
| Mateusz Żółtak | z****k@z****g | 13 |
| Tyler Hunt | t****t@u****u | 13 |
| Jamie Lentin | jm@l****k | 9 |
| Tobias | t****s@c****m | 9 |
| Guillaume Horel | g****l@s****m | 8 |
| Indrajeet Patil | p****e@g****m | 8 |
| Josh Schoenbachler | j****r@g****m | 7 |
| Etienne B. Racine | e****r@g****m | 7 |
| github-actions[bot] | 4****] | 6 |
| Jakob Richter | c****e@j****e | 5 |
| Mauricio Vargas | m****1@u****l | 5 |
| Murat Tasan | m****r@g****m | 3 |
| Maëlle Salmon | m****n@y****e | 3 |
| Jared Kofron | j****k@p****m | 3 |
| GitHub | n****y@g****m | 3 |
| Adam Forys | a****s@c****m | 3 |
| Murat Tasan | m****n@s****m | 2 |
| Charles Bailey | b****c@e****u | 2 |
| Edward Ferara | 2****1 | 2 |
| Troels Nielsen | t****n@l****m | 2 |
| Sebastian Gatscha | g****a@t****u | 2 |
| RobertZK | t****b@g****m | 2 |
| Jim Hester | j****r@g****m | 2 |
| and 13 more... | ||
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 68
- Total pull requests: 166
- Average time to close issues: 9 months
- Average time to close pull requests: about 1 month
- Total issue authors: 53
- Total pull request authors: 15
- Average comments per issue: 4.75
- Average comments per pull request: 1.16
- Merged pull requests: 125
- Bot issues: 0
- Bot pull requests: 32
Past Year
- Issues: 6
- Pull requests: 72
- Average time to close issues: N/A
- Average time to close pull requests: 2 days
- Issue authors: 6
- Pull request authors: 4
- Average comments per issue: 0.0
- Average comments per pull request: 0.07
- Merged pull requests: 51
- Bot issues: 0
- Bot pull requests: 32
Top Authors
Issue Authors
- pachadotdev (7)
- krlmlr (4)
- mgirlich (3)
- dpprdan (3)
- samterfa (2)
- mmuurr (2)
- jeffkeller-einc (1)
- armenic (1)
- karawoo (1)
- pedrobtz (1)
- richfitz (1)
- bhogan-mitre (1)
- nick-youngblut (1)
- ankane (1)
- jerrinot (1)
Pull Request Authors
- krlmlr (90)
- github-actions[bot] (32)
- jeroen (9)
- dpprdan (9)
- pachadotdev (8)
- maelle (4)
- galachad (3)
- Antonov548 (3)
- toppyy (2)
- meztez (1)
- jakob-r (1)
- artemklevtsov (1)
- zozlak (1)
- karawoo (1)
- pedrobtz (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 4
-
Total downloads:
- cran 50,081 last-month
- Total docker downloads: 11,643,735
-
Total dependent packages: 45
(may contain duplicates) -
Total dependent repositories: 176
(may contain duplicates) - Total versions: 73
- Total maintainers: 1
cran.r-project.org: RPostgres
C++ Interface to PostgreSQL
- Homepage: https://rpostgres.r-dbi.org
- Documentation: http://cran.r-project.org/web/packages/RPostgres/RPostgres.pdf
- License: MIT + file LICENSE
-
Latest release: 1.4.8
published 12 months ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/r-dbi/RPostgres
- Documentation: https://pkg.go.dev/github.com/r-dbi/RPostgres#section-documentation
- License: other
-
Latest release: v1.4.8
published 12 months ago
Rankings
proxy.golang.org: github.com/r-dbi/rpostgres
- Documentation: https://pkg.go.dev/github.com/r-dbi/rpostgres#section-documentation
- License: other
-
Latest release: v1.4.8
published 12 months ago
Rankings
conda-forge.org: r-rpostgres
- Homepage: https://github.com/r-dbi/RPostgres
- License: MIT
-
Latest release: 1.4.4
published almost 4 years ago
Rankings
Dependencies
- R >= 3.1.0 depends
- DBI >= 1.1.0 imports
- Rcpp >= 1.0.7 imports
- bit64 * imports
- blob >= 1.2.0 imports
- hms >= 1.0.0 imports
- lubridate * imports
- methods * imports
- withr * imports
- DBItest >= 1.7.1 suggests
- callr * suggests
- covr * suggests
- knitr * suggests
- rmarkdown * suggests
- testthat * suggests
- ./.github/workflows/check * composite
- ./.github/workflows/custom/after-install * composite
- ./.github/workflows/custom/before-install * composite
- ./.github/workflows/dep-matrix * composite
- ./.github/workflows/install * composite
- ./.github/workflows/rate-limit * composite
- ./.github/workflows/update-snapshots * composite
- actions/checkout v3 composite
- r-lib/actions/setup-r v2 composite
- ./.github/workflows/check * composite
- ./.github/workflows/commit * composite
- ./.github/workflows/custom/after-install * composite
- ./.github/workflows/custom/before-install * composite
- ./.github/workflows/git-identity * composite
- ./.github/workflows/install * composite
- ./.github/workflows/pkgdown-build * composite
- ./.github/workflows/pkgdown-deploy * composite
- ./.github/workflows/rate-limit * composite
- ./.github/workflows/roxygenize * composite
- ./.github/workflows/style * composite
- ./.github/workflows/update-snapshots * composite
- actions/checkout v3 composite
- actions/upload-artifact main composite
- r-lib/actions/check-r-package v2 composite
- ankane/setup-postgres v1 composite
- ./.github/workflows/git-identity * composite
- ./.github/workflows/install * composite
- actions/checkout v2 composite
- ./.github/workflows/get-extra * composite
- r-lib/actions/setup-pandoc v2 composite
- r-lib/actions/setup-r v2 composite
- r-lib/actions/setup-r-dependencies v2 composite
- dessant/lock-threads v2 composite
- nick-fields/retry v2 composite
- ./.github/workflows/custom/after-install * composite
- ./.github/workflows/custom/before-install * composite
- ./.github/workflows/git-identity * composite
- ./.github/workflows/install * composite
- ./.github/workflows/pkgdown-build * composite
- ./.github/workflows/pkgdown-deploy * composite
- ./.github/workflows/rate-limit * composite
- actions/checkout v3 composite
- actions/checkout v3 composite
- r-lib/actions/pr-fetch master composite
- r-lib/actions/pr-push master composite
- r-lib/actions/setup-r master composite
- actions/checkout v3 composite
- actions/upload-artifact main composite
- r-lib/actions/setup-pandoc v2 composite
- actions/cache v3 composite
- peter-evans/create-pull-request v4 composite
- actions/checkout v4 composite
- docker/build-push-action fdf7f43ecf7c1a5c7afe936410233728a8c2d9c2 composite
- docker/login-action 1f401f745bf57e30b3a2800ad308a87d2ebdf14b composite
- docker/metadata-action 62339db73c56dd749060f65a6ebb93a6e056b755 composite
- docker/setup-buildx-action 3762d454f382a89982d79f33e1ff246835322c4d composite
- ghcr.io/cynkra/rig-ubuntu main build
- ghcr.io/r-dbi/rpostgres main
- postgres latest