Question

THis is r。 The data (uspop) gives the decade-by-decade population of the United States (in millions)...

THis is r。

The data (uspop) gives the decade-by-decade population of the United States (in millions) as recorded by the decennial census for the period 1790–1970. Load the data.

1. Use names() and seq() to add the years 1790 – 1970 to the data vector.

2. Obtain the inter-decade differences. Which decade had the largest increase in US population?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

> population = uspop > years: = seq (1790,1970, 101. > d-data. frame (years ,population b- d # years population 3:93 1 1790 1for (i in 1 :nrow (d)) t diff dI 21 [i]-dI,21 i-1] t print (di) numeric (O) 111 1.93 [11 2.4 11] 3.26 [11 4.2 1] 6.0 L1] 8.4

Using diff we can see that 1960 decade had the largest population increase in US

Add a comment
Know the answer?
Add Answer to:
THis is r。 The data (uspop) gives the decade-by-decade population of the United States (in millions)...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT