I have a dataset myDF in R with a the variables L1,L2,L3,L4. How can I get the number of observations in L2, L3, and L4 that area greater than 0?
I would like to use the
We can use
colSums(myDF[c("L2", "L3", "L4")] > 0)