View source: R/ch.summariseBy.r
ch.summariseBy | R Documentation |
This function summarizes a dataframe by one grouping variable. It is easier to call than ddply within a function.
ch.summariseBy(data, grpCol, dvCol, newCol, FUN)
data |
a dataframe. |
grpCol |
a string specifying the name of the column in the dataframe containing the grouping variable. |
dvCol |
a string specifying the name of the column in the dataframe containing the variable you want to summarize. |
newCol |
a string specifying the name of the new column to be created that contains the summarized data. |
FUN |
the summarizing function (e.g., mean). |
a dataframe
ch.summariseBy (df, "sn", "RT", mean)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.