🔍 An RStudio addin slash regex utility belt
Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

78 lines
3.1KB

  1. % Generated by roxygen2: do not edit by hand
  2. % Please edit documentation in R/addins.R, R/gadget.R
  3. \name{regexplain_file}
  4. \alias{regexplain_file}
  5. \alias{regexplain_gadget}
  6. \alias{regexplain_web}
  7. \title{RegExplain gadget}
  8. \usage{
  9. regexplain_file(pattern = NULL, start_page = "RegEx")
  10. regexplain_gadget(
  11. text = NULL,
  12. pattern = NULL,
  13. start_page = if (is.null(text)) "Text" else "RegEx"
  14. )
  15. regexplain_web(text = NULL, pattern = NULL, start_page = "Text", ...)
  16. }
  17. \arguments{
  18. \item{pattern}{Regular Expression to edit or visualize using RegExplain}
  19. \item{start_page}{Open gadget to this tab, one of \code{"Text"}, \code{"RegEx"},
  20. \code{"Output"}, or \code{"Help"}}
  21. \item{text}{Text to explore in gadget (editable using interface)}
  22. \item{...}{
  23. Arguments passed on to \code{\link[shiny:shinyApp]{shiny::shinyApp}}
  24. \describe{
  25. \item{\code{ui}}{The UI definition of the app (for example, a call to
  26. \code{fluidPage()} with nested controls)}
  27. \item{\code{server}}{A function with three parameters: \code{input}, \code{output}, and
  28. \code{session}. The function is called once for each session ensuring that each
  29. app is independent.}
  30. \item{\code{onStart}}{A function that will be called before the app is actually run.
  31. This is only needed for \code{shinyAppObj}, since in the \code{shinyAppDir}
  32. case, a \code{global.R} file can be used for this purpose.}
  33. \item{\code{options}}{Named options that should be passed to the \code{runApp} call
  34. (these can be any of the following: "port", "launch.browser", "host", "quiet",
  35. "display.mode" and "test.mode"). You can also specify \code{width} and
  36. \code{height} parameters which provide a hint to the embedding environment
  37. about the ideal height/width for the app.}
  38. \item{\code{uiPattern}}{A regular expression that will be applied to each \code{GET}
  39. request to determine whether the \code{ui} should be used to handle the
  40. request. Note that the entire request path must match the regular
  41. expression in order for the match to be considered successful.}
  42. \item{\code{enableBookmarking}}{Can be one of \code{"url"}, \code{"server"}, or
  43. \code{"disable"}. This is equivalent to calling the
  44. \code{\link[shiny:enableBookmarking]{enableBookmarking()}} function just before calling
  45. \code{shinyApp()}. With the default value (\code{NULL}), the app will
  46. respect the setting from any previous calls to \code{enableBookmarking()}.
  47. See \code{\link[shiny:enableBookmarking]{enableBookmarking()}} for more information.}
  48. }}
  49. }
  50. \description{
  51. The function behind the RegExplain Selection and RegExplain File
  52. addins. Opens the RegExplain gadget interface in an RStudio viewer
  53. pane.
  54. }
  55. \section{Functions}{
  56. \itemize{
  57. \item \code{regexplain_file}: Opens file chooser to pick file, reads lines,
  58. returns first \code{regexplain.addin.max_lines} (default 100). Used in the
  59. "Regexplain File" \link{regexplain_addin}.
  60. \item \code{regexplain_web}: Launches the RegExplain gadget in a browser or an
  61. RStduio viewer pane.
  62. }}
  63. \examples{
  64. \dontrun{
  65. regexplain_gadget(text = month.name, pattern = "(Ma|Ju)|(er)")
  66. regexplain_web(text = month.name, pattern = "(Ma|Ju)|(er)")
  67. regexplain_file()
  68. }
  69. }