faq: Generate a SNAP Frequently Asked Questions (FAQ) widget

Description Usage Arguments Details Value Examples

View source: R/faq.R

Description

Generate a widget that displays FAQs in an information/about section of an SNAP Shiny app.

Usage

1
2
faq(id, format = "bscollapse", bscollapse_args = list(id = "faq", open
  = NULL, multiple = FALSE), showcase_args = list(drop = NULL))

Arguments

id

character, the id for the shinyBS::bsCollapse element.

format

character, "bscollapse" (default) or alternatively, "list".

bscollapse_args

a list of arguments passed to bsCollapse. Defaults to list(id = "faq", open = NULL, multiple = FALSE).

showcase_args

a list of arguments passed to snapp_showcase.

Details

faq is a simple function containing a dictionary of common SNAP FAQ entries. It is meant to override apputils::faq. It returns a Bootstrap Collapse menu FAQ format by default. Changing to format = "list" alternatively returns a list of question and answer pairs, each being a length-2 sublist. In this case, each question is a character string and each answer is either a simple HTML paragraph or a taglist of multiple HTML components if the answer contains more complex content (e.g., images and links).

A key difference with the open argument that can be passed in a list to bscollapse_args is that it must simply match a single dictionary entry id, not a collapse panel question title or id (e.g., open = "apps").

The current FAQ dictionary IDs and the questions they refer to include:

distributions

Why use probability distributions?

gcm

What is a GCM?

rcp

What is an RCP?

fmz

What are fire management zones?

apps

How did you make this app? Are other apps available?

alfresco_simulations

What do "simulations" refer to in the data selection area?

factsheet_about

What are fact sheets?

factsheet_availability

Why are fact sheets not always available?

climdist_variables

What do the available distributions represent?

Value

a shinyBS::bsCollapse object or a list.

Examples

1
#not run

leonawicz/snaputils documentation built on May 20, 2019, 10:21 p.m.