Selaa lähdekoodia

Change gadget output from "regex" -> "pattern"

for consistency with base and stringr argument names. Left "Send regex to console" button text same for consistency with tabs in gadget.
tags/v0.1.3
Garrick Aden-Buie 8 vuotta sitten
vanhempi
commit
0627759257
4 muutettua tiedostoa jossa 5 lisäystä ja 3 poistoa
  1. +1
    -1
      R/regex_gadget.R
  2. +2
    -0
      R/regex_help.R
  3. +1
    -1
      Readme.Rmd
  4. +1
    -1
      Readme.md

+ 1
- 1
R/regex_gadget.R Näytä tiedosto

observeEvent(input$done, { observeEvent(input$done, {
# browser() # browser()
if (pattern() != "") { if (pattern() != "") {
pattern <- paste0('regex <- "', escape_backslash(pattern()), '"')
pattern <- paste0('pattern <- "', escape_backslash(pattern()), '"')
rstudioapi::sendToConsole(pattern, FALSE) rstudioapi::sendToConsole(pattern, FALSE)
} }
stopApp() stopApp()

+ 2
- 0
R/regex_help.R Näytä tiedosto

runGadget(ui, server, viewer = viewer) runGadget(ui, server, viewer = viewer)
} }


# ---- Help - Shiny Module ----

help_ui <- function(id) { help_ui <- function(id) {
ns <- NS(id) ns <- NS(id)



+ 1
- 1
Readme.Rmd Näytä tiedosto

When you're done, click on the **Send Regex to Console** to send your regex expression to... the console! When you're done, click on the **Send Regex to Console** to send your regex expression to... the console!


```r ```r
> regex <- "(is|were|was) ([[:alpha:]]+) ([[:alpha:]]+)"
> pattern <- "(is|were|was) ([[:alpha:]]+) ([[:alpha:]]+)"
``` ```


### Additional Addins ### Additional Addins

+ 1
- 1
Readme.md Näytä tiedosto

regex expression to… the console\! regex expression to… the console\!


``` r ``` r
> regex <- "(is|were|was) ([[:alpha:]]+) ([[:alpha:]]+)"
> pattern <- "(is|were|was) ([[:alpha:]]+) ([[:alpha:]]+)"
``` ```


### Additional Addins ### Additional Addins

Loading…
Peruuta
Tallenna