queryBioassayDB: Perform a SQL query on a bioassayR database

Description Usage Arguments Value Author(s) References Examples

Description

Provides extreme query flexibility by allowing the user to perform any SQLite query on a bioassayR database. This allows for analysis beyond that provided by the built in query functions.

Usage

1
queryBioassayDB(object, query)

Arguments

object

A BioassayDB object referring to a bioassayR database.

query

A string containing a valid SQLite query (see SQLite documentation for more details).

Value

A data.frame containing the results of the specified query.

Author(s)

Tyler Backman

References

http://www.sqlite.org provides a complete reference for SQLite syntax that can be used with this function

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## connect to a test database
extdata_dir <- system.file("extdata", package="bioassayR")
sampleDatabasePath <- file.path(extdata_dir, "sampleDatabase.sqlite")
sampleDB <- connectBioassayDB(sampleDatabasePath)

## inspect the structure of the database before forming a query
queryBioassayDB(sampleDB, "SELECT * FROM sqlite_master WHERE type='table'")

## find all activity data for compound cid 2244 
queryBioassayDB(sampleDB, "SELECT * FROM activity WHERE cid = '2244'")

## disconnect from database
disconnectBioassayDB(sampleDB)

bioassayR documentation built on March 1, 2021, 2 a.m.