readdbtbl: [Deprecated] Create a dplyr connector to MySQL

Description Usage Arguments Details Value Examples

View source: R/database.R

Description

readdbtbl is deprecated, use dplyr::tbl instead. See example below.

Usage

1
readdbtbl(tableread)

Arguments

tableread

name of the database table to read

Details

[Deprecated] Old description

Return a dplyr tbl object for the given MySQL database table tbl objects allow lazy operations. See src_mysql. The issue is that 2 table objects created with this function will not share the same source. Therefore they will not be available for a merge within the database.

Value

a dplyr tbl object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## Not run: 
# From 2017 onwards, use
con <- RMariaDB::dbConnect(RMariaDB::MariaDB(), dbname = "tradeflows")
prod <- tbl(con, "raw_comext_product")
RMariaDB::dbDisconnect(con)
# Deprecated, before 2017
readdbtbl("raw_flow_yearly") %>%
    group_by(productcode) %>%
    summarise(nrow = n()) %>%
    arrange(nrow) %>%
    kable

## End(Not run)

paul4forest/tradeflows documentation built on Oct. 8, 2019, 10:35 a.m.