Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

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
4+7 =