Skip to content

Commit

Permalink
small changes before CRAN submission
Browse files Browse the repository at this point in the history
  • Loading branch information
nteetor committed Aug 25, 2017
1 parent ebca8bb commit 95fd3af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/testthat/test-pipe.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
context(' * testing %>% expressions')

test_that('%<-% and %>% caveat', {
skip('must wrap piped expressions in parentheses')
skip('must wrap piped expressions in parentheses or use right operator')
})

test_that('%<-% assign magrittr chain vector', {
Expand Down
4 changes: 2 additions & 2 deletions vignettes/unpacking-assignment.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ y
```

However, if we tried to get 3 elements and assign them an error would be raised
because `tail(nums, 3)` still only returns 2 values.
because `tail(nums, 3)` still returns only 2 values.

```{r, error = TRUE}
c(x, y, z) %<-% tail(nums, 3)
Expand Down Expand Up @@ -385,7 +385,7 @@ fish

## Right operator
The `magrittr` package provides a pipe operator `%>%` which allows functions
to be chained together in succession instead of nested. The left operator `%<-%`
to be called in succession instead of nested. The left operator `%<-%`
does not work well with these function chains. Instead, the right operator
`%->%` is recommended. The below example is adapted from the `magrittr` readme.

Expand Down

0 comments on commit 95fd3af

Please sign in to comment.