Search
 
SCRIPT & CODE EXAMPLE
 

CSS

Pass argument to group_by

mytable <- function( x, group ) {
  x %>% 
    group_by( .data[[group]] ) %>% 
    summarise( n = n() )
}

group_string <- 'Species'

mytable( iris, group_string )

`summarise()` ungrouping output (override with `.groups` argument)
# A tibble: 3 x 2
  Species        n
  <fct>      <int>
1 setosa        50
2 versicolor    50
3 virginica     50
Comment

Pass argument to group_by (2)

mytable <- function(x, group) {
  x %>% 
    group_by({{group}}) %>% 
    summarise(n = n())
}
mytable(iris, Species)
Comment

PREVIOUS NEXT
Code Example
Css :: css text shadow effect 
Css :: Create a addition element in center and rotate it 
Css :: css 2 images side by side to stack 
Css :: hwo to reload css in flask 
Css :: subtracting css 
Css :: prevent mailto href indexing 
Css :: edit default theme in component angular css 
Css :: how to override hover css 
Css :: Creating DEV logo with CSS 
Css :: Netlify CMS mobile responsive CSS 
Css :: how can i reset the paswd of my subrion admin panel 
Css :: decroation of title using css 
Css :: why use 0.5rem 0 in margin in css 
Css :: increase width in template in fandom 
Css :: how to get rid of underline for links in css 
Css :: after 50% not center 
Css :: tipografias family style para css y html 
Css :: <asp:FileUpload ID="Fu_Result" runat="server" Width="250px" CssClass="inputfile" / 
Css :: spinner 
Css :: edit input field css 
Css :: play button animation css 
Css :: responsive css webpage code 
Typescript :: next js onclick navigate 
Typescript :: react children 
Typescript :: nextjs with tailwind css and typescript 
Typescript :: angular add httpclient 
Typescript :: from list of lists to dataframe 
Typescript :: cra template-typescript cmd 
Typescript :: last 5 commits git log 
Typescript :: serenity Criteria typescript 
ADD CONTENT
Topic
Content
Source link
Name
3+5 =