My goal:
I need to know how many points has the person "kll2". What is the best way to do it?
When I write this code I get NA as an answer.
comp <- dataset%>%
subset(person == "kll2") %>%
summarise(sum_kll2 = sum(points))
comp
My "dataset" looks like this:
id person points
201 rt99 NA
201 rt99 3
201 rt99 2
202 kt 4
202 kt NA
202 kt NA
203 rr 4
203 rr NA
203 rr NA
204 jk 2
204 jk 2
204 jk NA
322 knm3 5
322 knm3 NA
322 knm3 3
343 kll2 2
343 kll2 1
343 kll2 5
344 kll NA
344 kll 7
344 kll 1