get_participants {mpathsenser}R Documentation

Get all participants

Description

[Stable]

Usage

get_participants(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 participant_id and study_id.

Examples

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

# Add some participants
DBI::dbExecute(db, "INSERT INTO Study VALUES('study1', 'data_format1')")
DBI::dbExecute(db, "INSERT INTO Participant VALUES('participant1', 'study1')")

# Get the participants
get_participants(db)

# Cleanup
close_db(db)
file.remove(file.path(tempdir(), "mydb.db"))

[Package mpathsenser version 1.2.3 Index]