Hi there Todorova, Welcome to community.rstudio.com! I wanted to send a friendly note about the way you're using this forum. I feel you're not posing your issue and interacting in a way that makes it easy for others to help you out.
I would really encourage you to review the following guide, FAQ: Tips for writing R-related questions.
For example, the guide emphasizes asking coding questions with a
reprex . You may have noticed that many people here request issues come in the form of a minimal
reprex , that's because asking questions this way saves answerers a lot of time helping you get your issue resolved, reducing the number of back-and-forths requires.
For your question, are you trying to see the rate of change, or just how much the dependent variable has changed? If you're trying to answer the latter, you're interested in finding the total number of membership users for 2011 subtracted from the total number of membership users for 2012.
I created a reproducible example below that captures this workflow. For example, if your data is stored in a dataframe called
members with a column for
2012 respectively, you might follow something like this:
members <- data.frame(year_2011 = 1:5, year_2012 = 6:10)
sum(members$year_2012) - sum(members$year_2011)
Hope this helps, and again, welcome to Community!