DBF 0.0.0.9000
  • Reference
  • Changelog

DBF

The goal of DBF is to provide dummy DB syntax in namespace to use functions with dplyr

Installation

You can install the developed version of DBF from github with:

# if you don't instatll remotes package, uncomment & run below line.
# install.packages("remotes")
remotes::install_github("mrchypark/DBF")

Example

This is a basic example which shows you how to solve a common problem:

library(DBI)
library(DBF)

conn <- dbConnect(
  RPostgres::Postgres(),
  host = HOST, # i.e. 'ec2-54-83-201-96.compute-1.amazonaws.com'
  port = 5432, # or any other port specified by your DBA
  user = 'postgres',
  password = 'password'
)

list_of_syntax <- get_function(conn)
set_function(list_of_syntax)

Usage

library(dplyr)
library(DBI)
library(DBF)

conn <- dbConnect(
  RPostgres::Postgres(),
  host = HOST, # i.e. 'ec2-54-83-201-96.compute-1.amazonaws.com'
  port = 5432, # or any other port specified by your DBA
  user = 'postgres',
  password = 'password'
)

copy_to(conn, test)

list_of_syntax <- get_function(conn)
set_function(list_of_syntax)

tbl(conn, "test") %>% 
  mutate(date = DATE_TRUCN("day", date))

Special Thanks

Tyler Morgan-Wall @tylermorganwall history

Links

  • Browse source code at
    https://​github.com/​mrchypark/​DBF
  • Report a bug at
    https://​github.com/​mrchypark/​DBF/​issues

License

  • Full license
  • MIT + file LICENSE

Developers

  • Chanyub Park
    Author, maintainer ORCID

Developed by Chanyub Park.

Site built with pkgdown.