The script works nicely, Arun. You were right, I pasted code from email instead of Rhelp and didn't reformat properly in R. I appreciate your time with this! -----Original Message----- It seems like part of the next line is also being run (in the end 'colnames'). For e.g. res2 <- within(as.data.frame(res1),`Count of Case ID` <- dcast(FLSAdata_melt, ViolationDesc + ReasonDesc ~ variable, length, margins=TRUE)[,3])[,c(4,1:3)] colnames #Error: unexpected symbol in "res2 <- within(as.data.frame(res1),`Count of Case ID` <- #dcast(FLSAdata_melt, ViolationDesc + ReasonDesc ~ variable, length, margins=TRUE)#[,3])[,c(4,1:3)] colnames"
count and sum simultaneously in R pivot table
1 message · Crombie, Burnette N