Skip to content

Commit

Permalink
* mgusb no longer uses trim = TRUE by default.
Browse files Browse the repository at this point in the history
  • Loading branch information
trinker committed Feb 22, 2017
1 parent 4045334 commit 6ee21b3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ BUG FIXES
replace fixed tokens with a single value or remove them entirely. This yields
an optimized solution that is much faster than `mgsub`.

CHANGES

* `mgusb` no longer uses `trim = TRUE` by default.

textclean 0.2.1 - 0.3.0
----------------------------------------------------------------
Expand Down
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ textclean 0.3.1
replace fixed tokens with a single value or remove them entirely. This yields
an optimized solution that is much faster than `mgsub`.

**CHANGES**

* `mgusb` no longer uses `trim = TRUE` by default.

textclean 0.2.1 - 0.3.0
----------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion R/mgsub.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' mgsub(DATA$state, c("it's", "I'm"), c("it is", "I am"))
#' mgsub(DATA$state, "[[:punct:]]", "PUNC", fixed = FALSE)
mgsub <- function (x, pattern, replacement, leadspace = FALSE,
trailspace = FALSE, fixed = TRUE, trim = TRUE, order.pattern = fixed,
trailspace = FALSE, fixed = TRUE, trim = FALSE, order.pattern = fixed,
...) {

if (leadspace | trailspace) replacement <- spaste(replacement, trailing = trailspace, leading = leadspace)
Expand Down
2 changes: 1 addition & 1 deletion man/mgsub.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6ee21b3

Please sign in to comment.