I am working with the following data frame:
Name Color L1 L2 R3
Joe Red 5.4 6.2 7.7
Eric Blue NA 4.1 6.1
Steve Green NA NA 1.2
Mike Red NA NA NA
I would like to count the number of observations across columns L1, L2, and L3, but not count NA values. So I would like the above table to become:
Name Color L1 L2 R3 Count
Joe Red 5.4 6.2 7.7 3
Eric Blue NA 4.1 6.1 2
Steve Green NA NA 1.2 1
Mike Red NA NA NA 0
Thanks in advance!