remove_to_text: Remove to Text

Description Usage Arguments Value Examples

View source: R/Text_Removal.R

Description

An add-in helper function that deletes the code between the cursor and the desired string.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13

Arguments

backTo

The regex pattern to remove text to (character scalar).

backward

Whether to remove text before the cursor (default) or text after it (boolean scalar).

Value

The deleted code, invisibly (character scalar).

Examples

1
2
3
4
5
# Type "mtcars %>% mutate(a = 1) %>% filter(cyl = 2)", & run the add-in function

# Type "c('apple', 'banana', cherry')", & run the add-in function

# Type "c(apple, banana, cherry)", & run the add-in function

KO112/KO documentation built on Oct. 2, 2020, 9:21 a.m.