Finding unique terms
Yes, I thought that as well and had worked out this but didn't send it:
add_Pscores<-function(x) {
return(sum(unlist(x),na.rm=TRUE))
}
by(rzdf[,c("PO1M", "PO1T", "PO2M", "PO2T")],rzdf$STUDENT_ID,FUN=add_Pscores)
rzdf$STUDENT_ID: AA15285
[1] 724.8
------------------------------------------------------------
rzdf$STUDENT_ID: AA15286
[1] 661.45
Jim
On Fri, Oct 12, 2018 at 1:37 PM Jeff Newmiller <jdnewmil at dcn.davis.ca.us> wrote:
You said "add up"... so you did not mean to say that? Denes computed the mean... On October 11, 2018 3:56:23 PM PDT, roslinazairimah zakaria <roslinaump at gmail.com> wrote:
Hi Denes, It works perfectly as I want!