R studio simple issue

#1

Ladies and Gentlemen,

I have an R-studio related issue. It is a very simple one, so:

My dataset is separated in the year 2011 and 2012. My dependent variable is a number of membership users. I want to see whether this number has increased from 2011 to 2012 or decreased.

Thank you,

Kindest regards,

Todorova

0 Likes

#2

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 2011 and 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!

0 Likes

#3

Hi there,

I hope you were able to find a solution to your issue! If you did find one, do you mind sharing it so that others facing similar problems can see how you resolved it?

If your question's been answered (even by you!), would you mind choosing a solution? It helps other people see which questions still need help, or find solutions if they have similar problems. Here’s how to do it:

FAQ: How do I mark a solution? meta

If your question has been answered don't forget to mark the solution Folks in the future can come along and easily see what worked for you. You acknowledge the person who solved the issue. If you're the original poster and the category allows solutions to be marked there should be a little box at the bottom of replies that you can click to select that response as your "solution." Before: [image] After: [image] Based on replies by @mara

0 Likes

closed #4

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.

0 Likes