I have a data frame with 900,000 rows and 11 columns in R. The column names and types are as follows:
column name: date / mcode / mname / ycode / yname / yissue
You can also use xtabs or tapply:
xtabs
tapply
xtabs(cbind(bsent, breturn, tsent, treturn, csales) ~ yname, data) tapply(data$bsent, data$yname, sum)