Quote:
Originally Posted by plexiq
You just want to know the number of non-NA values as denominator?
As an example, if you have your data as a matrix with one row per user and columns 3-5 containing the scores:
dummydata = matrix(nrow=150, ncol=5)
You can get the number of non-NA values per user as:
valuesperuser = rowSums(!is.na(dummydata[,3:5]))
If you need some more customized logic for creating the denominator, check the lapply function.
Thanks. This feels like it will help. Only issue is there are different weights for each metric. So, afaict, I want to multiply the values by their weights before doing what you suggest above.
I'll report back when I try this, but thanks again.