-
Notifications
You must be signed in to change notification settings - Fork 2
Description
One of the few things that's easier to do in SAS than in R is summing across ranges of variables by number. In SAS, sum(of v1-v4) is interpreted as v1 + v2 + v3 + v4 -- but R has nothing similar that I'm aware of. This is unfortunate because so many Census Bureau datasets have this naming scheme, and many times I need to add up several variables at once.
I created the attached function (building on the framework developed by former Research staff Nicole Sullivan), but I store it in multiple repositories. I figured it would be good to have this in councilR so that it lives in only one place and potentially help others.
Is this something that would be a good fit for councilR? If so, please feel free to make edits to anything and everything, because I am not an expert in designing functions. I also made this with Census Bureau data in mind, so you may find opportunities to generalize the code for other uses.