Skip to content
Permalink
Browse files

Merge pull request #322 from lorenzwalthert/bang

- remove spaes after !! and !!! (#322).
  • Loading branch information...
lorenzwalthert committed Feb 23, 2018
2 parents 15689bb + 7045a29 commit 5982e839356bae4b14c285ac84555009871e7132
@@ -242,7 +242,7 @@ set_space_after_bang_bang <- function(pd_flat) {
(pd_flat$newlines == 0L) &
(pd_flat$token_before == "'!'")

pd_flat$spaces[last_bang] <- 1L
pd_flat$spaces[last_bang] <- 0L
pd_flat
}

@@ -1,5 +1,5 @@
a(! !! x)
k(!! g)
a(!!! x)
a(!! ! x)
a(! !!x)
k(!!g)
a(!!!x)
a(!! !x)
a(!b)
@@ -1,9 +1,9 @@
nameshift <- c(SL = "Sepal.Length")
head(dplyr::rename(iris[, 1:2], ! ! ! nameshift), 3)
head(dplyr::rename(iris[, 1:2], !! ! nameshift), 3)
head(dplyr::rename(iris[, 1:2], !!! nameshift), 3)
head(dplyr::rename(iris[, 1:2], ! ! !nameshift), 3)
head(dplyr::rename(iris[, 1:2], !! !nameshift), 3)
head(dplyr::rename(iris[, 1:2], !!!nameshift), 3)
my_summarise <- function(df, group_var) {
df %>%
group_by(! ! group_var) %>%
group_by(! !group_var) %>%
summarise(a = mean(a))
}
@@ -1,6 +1,6 @@
mtcars %>%
group_by(am) %>%
summarise(
!! mean_nm := mean(cyl),
!! count_nm := n()
!!mean_nm := mean(cyl),
!!count_nm := n()
)

0 comments on commit 5982e83

Please sign in to comment.
You can’t perform that action at this time.