🔍 An RStudio addin slash regex utility belt
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

82 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. \value{
  51. The regular expression built in the app is returned as a character
  52. string.
  53. }
  54. \description{
  55. The function behind the RegExplain Selection and RegExplain File
  56. addins. Opens the RegExplain gadget interface in an RStudio viewer
  57. pane.
  58. }
  59. \section{Functions}{
  60. \itemize{
  61. \item \code{regexplain_file}: Opens file chooser to pick file, reads lines,
  62. returns first \code{regexplain.addin.max_lines} (default 100). Used in the
  63. "Regexplain File" \link{regexplain_addin}.
  64. \item \code{regexplain_web}: Launches the RegExplain gadget in a browser or an
  65. RStduio viewer pane.
  66. }}
  67. \examples{
  68. \dontrun{
  69. regexplain_gadget(text = month.name, pattern = "(Ma|Ju)|(er)")
  70. regexplain_web(text = month.name, pattern = "(Ma|Ju)|(er)")
  71. regexplain_file()
  72. }
  73. }