Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR R

Pass argument to group_by (2)

mytable <- function(x, group) {
  x %>% 
    group_by({{group}}) %>% 
    summarise(n = n())
}
mytable(iris, Species)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Pass #argument
ADD COMMENT
Topic
Name
8+7 =