I need help with finding an equation. \"remember that each congress lasts 2 year
ID: 3730901 • Letter: I
Question
I need help with finding an equation. "remember that each congress lasts 2 years, the first congress convened in 1789, and the last congress in our dataset (the 113th) started in 2013. make clever use of mutate() to generate a new variable in the hdw data, show your code, and provide a summary of your new variable to confirm that it ranges from 1789 to 2013." I basically need to find an equation that would allow me to convert the number of a session of congress into a year number. This is for a computer science class.
Explanation / Answer
The session number to year would map as follows:
and so on.
The base year is 1789 which corresponds to session 1. For every increase in the session number (by 1), the year increases by 2. Putting this understanding in the form on an equation gives the following:
Year = 1789 + 2 X (Session - 1)
The expression (Session - 1) is used since the difference of the session number with the first session is needed. The correctness of the equation can be verified by calculating for Session = 1,2,3,.... and comparing it with a manually populated table.
1 1789 2 1791 3 1793 4 1795 5 1797Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.