Skip to content

Commit 88b05f8

Browse files
committed
Update README
1 parent 9b9588d commit 88b05f8

File tree

2 files changed

+25
-21
lines changed

2 files changed

+25
-21
lines changed

Readme.Rmd

+10-8
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,11 @@ Inspired by [RegExr.com][regexr] and `stringr::str_view()`.
2727

2828
## Installation
2929

30-
Installation is easy with `devtools`
30+
Installation is easy with `remotes`
3131

3232
```r
33-
devtools::install_github("gadenbuie/regexplain")
34-
```
35-
36-
or for hands-free installation
37-
38-
```
39-
source("https://install-github.me/gadenbuie/regexplain")
33+
# install.packages("remotes")
34+
remotes::install_github("gadenbuie/regexplain")
4035
```
4136

4237
## RegExplain in Action
@@ -60,6 +55,13 @@ Just select the text or object containing text (such as the variable name of a v
6055

6156
<img src="docs/rstudio-addin-list.png" width = "250px;" alt="regexplain in the Rstudio Addins dropdown">
6257

58+
You can also open the addin with `regexplain_gadget()`.
59+
This allows you to pass text or a regular expression to the gadget, which is useful when you want to work with a regular expression in your code or environment.
60+
61+
```r
62+
regexplain_gadget(text_vector, "\\b(red|blue|green): \\d{3}")
63+
```
64+
6365
The addin will open an interface with 4 panes where you can
6466

6567
- edit the **text** you've imported

Readme.md

+15-13
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Status: Active – The project has reached a stable, usable state and is
1010
being actively
1111
developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active)
1212
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/regexplain)](https://cran.r-project.org/package=regexplain)
13-
<!-- [![Last-changedate](https://img.shields.io/badge/last%20change-2018--04--19-yellowgreen.svg)](/commits/master) -->
13+
<!-- [![Last-changedate](https://img.shields.io/badge/last%20change-2020--07--02-yellowgreen.svg)](/commits/master) -->
1414

1515
<!-- Links -->
1616

@@ -23,16 +23,13 @@ Inspired by [RegExr.com](https://regexr.com/) and `stringr::str_view()`.
2323

2424
## Installation
2525

26-
Installation is easy with `devtools`
26+
Installation is easy with `remotes`
2727

2828
``` r
29-
devtools::install_github("gadenbuie/regexplain")
29+
# install.packages("remotes")
30+
remotes::install_github("gadenbuie/regexplain")
3031
```
3132

32-
or for hands-free installation
33-
34-
source("https://install-github.me/gadenbuie/regexplain")
35-
3633
## RegExplain in Action
3734

3835
#### Overview
@@ -55,11 +52,18 @@ examples](https://raw.githubusercontent.com/gadenbuie/regexplain/af4fe0988a10f34
5552
The main feature of this package is the RStudio Addin **RegExplain
5653
Selection**. Just select the text or object containing text (such as the
5754
variable name of a vector or a data.frame column) and run **RegExplain
58-
Selection** from the RStudio Addins
59-
dropdown.
55+
Selection** from the RStudio Addins dropdown.
6056

6157
<img src="docs/rstudio-addin-list.png" width = "250px;" alt="regexplain in the Rstudio Addins dropdown">
6258

59+
You can also open the addin with `regexplain_gadget()`. This allows you
60+
to pass text or a regular expression to the gadget, which is useful when
61+
you want to work with a regular expression in your code or environment.
62+
63+
``` r
64+
regexplain_gadget(text_vector, "\\b(red|blue|green): \\d{3}")
65+
```
66+
6367
The addin will open an interface with 4 panes where you can
6468

6569
- edit the **text** you’ve imported
@@ -72,8 +76,7 @@ The addin will open an interface with 4 panes where you can
7276
![The panes of regexplain](docs/regexplain-gadget-tabs.png)
7377

7478
When you’re done, click on the **Send Regex to Console** to send your
75-
regex expression to… the
76-
console\!
79+
regex expression to… the console\!
7780

7881
``` r
7982
> pattern <- "\\b(red|orange|yellow|green|blue|purple|white|brown)(?:\\s(\\w+))?"
@@ -120,8 +123,7 @@ patterns.
120123

121124
The full library is stored as a JSON file in
122125
[inst/extdata/patterns.json](/inst/extdata/patterns.json), feel free to
123-
contribute patterns you find useful or use regularly via pull
124-
request.
126+
contribute patterns you find useful or use regularly via pull request.
125127

126128
<img src="docs/regexplain-gadget-library.png" height="400px" alt="regexplain library modal">
127129

0 commit comments

Comments
 (0)