what does the "!!!" mean in R code

I noticed a R function, and below is part of code of function. May some one help to to understand why the author uses "rlang::syms(groupvars)" and "group_by(!!!groupvars)" in the code? what do the "!!!" and "!!" mean in code?


groupvars <- rlang::syms(groupvars)
measurevar <- rlang::sym(measurevar)

datac <- data %>%
dplyr::group_by(!!!groupvars) %>%
N = length2(!!measurevar, na.rm = na.rm),
sd = sd (!!measurevar, na.rm = na.rm),
!!measurevar := mean (!!measurevar, na.rm = na.rm),

As part of quasiquotation. See the unquoting section:


Though you can now do this with cury-curly well now:

Thanks a lot. I still need to learn.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.