Skip to contents

[Stable]

Usage

get_studies(db, lazy = FALSE)

Arguments

db

db A database connection, as created by create_db().

lazy

Whether to evaluate lazily using dbplyr.

Value

A data frame containing all studies.

Examples

# Create a database
db <- create_db(tempdir(), "mydb.db")

# Add some studies
DBI::dbExecute(db, "INSERT INTO Study VALUES('study1', 'data_format1')")
#> [1] 1

# Get the studies
get_studies(db)
#>   study_id  data_format
#> 1   study1 data_format1

# Cleanup
close_db(db)
file.remove(file.path(tempdir(), "mydb.db"))
#> [1] TRUE