Bläddra i källkod

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 år sedan
förälder
incheckning
0627759257
4 ändrade filer med 5 tillägg och 3 borttagningar
  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 Visa fil

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 Visa fil

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 Visa fil

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 Visa fil

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

Laddar…
Avbryt
Spara