瀏覽代碼

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 年之前
父節點
當前提交
0627759257
共有 4 個文件被更改,包括 5 次插入3 次删除
  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 查看文件

@@ -169,7 +169,7 @@ regex_gadget <- function(text = NULL,
observeEvent(input$done, {
# browser()
if (pattern() != "") {
pattern <- paste0('regex <- "', escape_backslash(pattern()), '"')
pattern <- paste0('pattern <- "', escape_backslash(pattern()), '"')
rstudioapi::sendToConsole(pattern, FALSE)
}
stopApp()

+ 2
- 0
R/regex_help.R 查看文件

@@ -29,6 +29,8 @@ regexplain_cheatsheet <- function() {
runGadget(ui, server, viewer = viewer)
}

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

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


+ 1
- 1
Readme.Rmd 查看文件

@@ -55,7 +55,7 @@ The addin will open an interface with 4 panes where you can
When you're done, click on the **Send Regex to Console** to send your regex expression to... the console!

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

### Additional Addins

+ 1
- 1
Readme.md 查看文件

@@ -58,7 +58,7 @@ When you’re done, click on the **Send Regex to Console** to send your
regex expression to… the console\!

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

### Additional Addins

Loading…
取消
儲存