title: How to find mean and sd within df's groups?
body: <p>I'am struggle with one task: I have a dataframe, where one column is always numeric and others are always factors. I don't know the index of numeric columns.
  My task is: to group dataframe by all factors, then to find mean and sd within each group.
  I have already done some part of work:</p>
  
  <pre><code>library(dplyr)
  library(stats)
  df &lt;-  data.frame(
    col1 = sample(LETTERS[1:3], 100, replace=TRUE),
    col2 = sample(LETTERS[1:3], 100, replace=TRUE),
    col3 = rnorm(100))
  df
  find_mean_sd &lt;- function(df){
    numeric &lt;- which(sapply(df,is.numeric)==TRUE)
    columns &lt;- names(df)[-numeric]
    dots &lt;- lapply(columns, as.symbol)
    df %&gt;%
      group_by_(.dots=dots) %&gt;%
      summarise(mean = mean(df[,numeric]), SD= sd(df[,numeric]))
  }
  find_mean_sd(df)
  </code></pre>
  
  <p>I am confused with mean and sd: why do they the same for all groups? I wanted to get 9 different meanings.</p>