This is what worked for me. I had a set of 24 variables which worked under the 1 or missing system (checked or unchecked). I needed to count them. the final score was the count of checked variables.
data <- data %>%
dplyr::mutate(final_score = 24 - rowSums(across(c(
Var1, Var2, Var3, Var4, Var5, Var6, Var7, Var8, Var9, Var10, Var11, Var12,
Var13, Var14, Var15, Var16, Var17, Var18, Var19, Var20, Var21, Var22, Var23,
Var24),
is.na)))
Notes
These variables were not XXX#, they each had different names, so anything on the order of var1-var24 was not possible.
I could have used var1:var24, but I don't like trusting the order of variables in my data set.