Based on the following code, how can I add a column to this pivot table
output that will count CaseID's for each variable sum?  CaseID is a factor.

# library(reshape)
# FLSA_Violation_Reason_melt <- melt(FLSA_ViolRsnfixed, 
#                                    id=c("CaseID", "ViolationDesc",
"ReasonDesc"),
#                                    measure=c("BW_Due", "BW_ATP",
"EEs_Rep"))
# 
# FLSA_Violation_Reason_cast <- cast(FLSA_Violation_Reason_melt, 
#                                    ViolationDesc + ReasonDesc ~ variable,
#                                    sum, margins=TRUE)

Thank you.



--
View this message in context: 
http://r.789695.n4.nabble.com/count-and-sum-simultaneously-in-R-pivot-table-tp4684896.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to