regexplain_gadget: RegExplain gadget

Description Usage Arguments Value Functions Examples

View source: R/gadget.R

Description

The function behind the RegExplain Selection and RegExplain File addins. Opens the RegExplain gadget interface in an RStudio viewer pane.

Usage

1
2
3
4
5
6
7
8
9
regexplain_file(pattern = NULL, start_page = "RegEx")

regexplain_gadget(
  text = NULL,
  pattern = NULL,
  start_page = if (is.null(text)) "Text" else "RegEx"
)

regexplain_web(text = NULL, pattern = NULL, start_page = "Text", ...)

Arguments

pattern

Regular Expression to edit or visualize using RegExplain

start_page

Open gadget to this tab, one of "Text", "RegEx", "Output", or "Help"

text

Text to explore in gadget (editable using interface)

...

Arguments passed on to shiny::shinyApp

ui

The UI definition of the app (for example, a call to fluidPage() with nested controls)

server

A function with three parameters: input, output, and session. The function is called once for each session ensuring that each app is independent.

onStart

A function that will be called before the app is actually run. This is only needed for shinyAppObj, since in the shinyAppDir case, a global.R file can be used for this purpose.

options

Named options that should be passed to the runApp call (these can be any of the following: "port", "launch.browser", "host", "quiet", "display.mode" and "test.mode"). You can also specify width and height parameters which provide a hint to the embedding environment about the ideal height/width for the app.

uiPattern

A regular expression that will be applied to each GET request to determine whether the ui should be used to handle the request. Note that the entire request path must match the regular expression in order for the match to be considered successful.

enableBookmarking

Can be one of "url", "server", or "disable". This is equivalent to calling the enableBookmarking() function just before calling shinyApp(). With the default value (NULL), the app will respect the setting from any previous calls to enableBookmarking(). See enableBookmarking() for more information.

Value

The regular expression built in the app is returned as a character string.

Functions

Examples

1
2
3
4
5
6
## Not run: 
regexplain_gadget(text = month.name, pattern = "(Ma|Ju)|(er)")
regexplain_web(text = month.name, pattern = "(Ma|Ju)|(er)")
regexplain_file()

## End(Not run)

gadenbuie/regexplain documentation built on June 1, 2021, 4:24 p.m.