Skip to contents

Read Tables from a SQLite Database

Usage

# S3 method for class 'character'
rws_read(x, meta = TRUE, conn, ...)

Arguments

x

A character vector of table names.

meta

A flag specifying whether to preserve meta data.

conn

A SQLiteConnection to a database.

...

Not used.

Value

A named list of the data frames.

Examples

conn <- rws_connect()
rws_write(rws_data, exists = FALSE, conn = conn)
rws_write(rws_data[c("date", "ordered")],
  x_name = "data2",
  exists = FALSE, conn = conn
)
rws_read(c("rws_data", "data2"), conn = conn)
#> $rws_data
#> # A tibble: 3 × 6
#>   logical date       factor ordered posixct             units
#>   <lgl>   <date>     <fct>  <ord>   <dttm>                [m]
#> 1 TRUE    2000-01-01 x      x       2001-01-02 03:04:05  10  
#> 2 FALSE   2001-02-03 y      y       2006-07-08 09:10:11  11.5
#> 3 NA      NA         NA     NA      NA                   NA  
#> 
#> $data2
#> # A tibble: 3 × 2
#>   date       ordered
#>   <date>     <ord>  
#> 1 2000-01-01 x      
#> 2 2001-02-03 y      
#> 3 NA         NA     
#> 
rws_disconnect(conn)