The following examples show how to use this syntax on the following data frame: #create data frameĭf <- data. Fortunately this is easy to do using the following basic syntax: aggregate(col_to_sum ~ col_to_group_by, data=df, sum) ![]() ![]() Often you may be interested in only finding the sum of rows in an R data frame that meet some criteria.
0 Comments
Leave a Reply. |