[R] Finding unique terms
Jim Lemon
drj|m|emon @end|ng |rom gm@||@com
Fri Oct 12 05:37:09 CEST 2018
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 using 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 using gmail.com> wrote:
> >Hi Denes,
> >
> >It works perfectly as I want!
More information about the R-help
mailing list