qry_row {shinymgr}R Documentation

Retrieve one or more rows from a specified table from the shinymgr.sqlite. Used internally. database given a set of conditions on one or more columns.

Description

Returns dataframe containing specified columns and rows from the shinymgr database based on specified conditions.

Usage

qry_row(tableName, rowConditions, colConditions, shinyMgrPath)

Arguments

tableName

The name of the table of the shinymgr database (e.g. people, apps, etc.).

rowConditions

A dataframe where the keys correspond to columns of the specified dataframe and key values correspond to the equality condition that must be satisfied by any returning rows, else returns all rows (default returns all rows).

colConditions

A vector specifying the names of columns to be returned from the query (default returns all columns).

shinyMgrPath

File path to the main shiny manager project directory

Value

Dataframe consisting of the specified rows and columns

Tutorials

The shinymgr learnr tutorials include, in order:

  1. learnr::run_tutorial(name = "intro", package = "shinymgr")

  2. learnr::run_tutorial(name = "shiny", package = "shinymgr")

  3. learnr::run_tutorial(name = "modules", package = "shinymgr")

  4. learnr::run_tutorial(name = "app_modules", package = "shinymgr")

  5. learnr::run_tutorial(name = "tests", package = "shinymgr")

  6. learnr::run_tutorial(name = "shinymgr", package = "shinymgr")

  7. learnr::run_tutorial(name = "database", package = "shinymgr")

  8. learnr::run_tutorial(name = "shinymgr_modules", package = "shinymgr")

  9. learnr::run_tutorial(name = "apps", package = "shinymgr")

  10. learnr::run_tutorial(name = "analyses", package = "shinymgr")

  11. learnr::run_tutorial(name = "reports", package = "shinymgr")

  12. learnr::run_tutorial(name = "deployment", package = "shinymgr")

References

https://code.usgs.gov/vtcfwru/shinymgr

See Also

Other qry: qry_app_flow(), qry_app_stitching(), qry_insert(), qry_mod_info()

Examples

# set the file path to the main shinymgr directory
parentPath <- tempdir()
shinyMgrPath <- paste0(parentPath, '/shinymgr')

shinymgr_setup(parentPath = parentPath, demo = TRUE)

# use the default database path
qry_row(
  tableName = 'apps', 
  rowConditions = data.frame(pkAppName = 'iris_explorer'), 
  colConditions = c('appDisplayName', 'appDescription'),
  shinyMgrPath = shinyMgrPath
)

# remove demo
unlink(shinyMgrPath, recursive = TRUE)


[Package shinymgr version 1.1.0 Index]