add_ui: Add the UI of one app within the UI of another app

Description Usage Arguments Details Value See Also Examples

View source: R/add_ui.R

Description

Sources a ui.R file before parsing and evaluating its contents in a specified environment

Usage

1
add_ui(app, path)

Arguments

app

Name of the app from which the content of the ui.R will be pulled

path

Path to a directory containing the app from which the content of the ui.R will be pulled

Details

Currently, this function can be used to insert an server into a navbarPage app. The types of apps that can be inserted are:

A server can be added as an entire tabPanel or as a row within within a tabPanel portion of a shiny app.

May be used with apps stored in packages other than teachingApps. However, apps are assumed be stored in the apps/ directory located at top level of the package.

Value

A list of length 2

head

A sub list containing the HTML content within the <head> tag

body

A sub list containing the HTML content within the <body> tag

See Also

add_server add_rmd

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 

## ui.R from app: 'maximum_likelihood'

ui_ml <- system.file('apps', 
                     'maximum_likelihood',
                     'server.R',
                     package = 'teachingApps') 
browseURL(ui_ml)

## ui.R from app: 'distribution_weibull'

ui_dw <- system.file('apps', 
                     'distribution_weibull',
                     'server.R',
                     package = 'teachingApps') 
browseURL(ui_dw)


## End(Not run)

teachingApps documentation built on July 1, 2020, 5:58 p.m.