Reading Consumer Price Index data in R? -


would read me the data frame the data from this link. Sadly, the data is not in the CSV file. What is the best way to do this?

I tried

  cpiai  

Thank you!

Read.table:

  Path & lt; - "http://www.bls.gov/cpi/cpifiles/cpiai.txt" cpiai & lt; - read.table (path, header = t, fill = TRUE, skip = 16) & gt; Head (CPII) Year January February March April May June July August September October October November Average. December, the average 1 913 9.8 9.8 9.8 9.9 10.0 10.0 10.1 10.0 9.9 NA 2 9 14 9 10 9 9 9 9 9 9 9 9 9 9 9 10 10.0 10.2 10.2 10.1 10.2 10.1 10.0 1.0 1.0 3 1915 10.1 10.0 9.9 10.0 10.1 10.1 10.1 10.1 10.1 10.2 10.3 10.3 10.3 10.1 2.0 1.0 4 1916 10.4 10.4 10.5 10.6 10.7 10.8 10.8 10.9 11.1 11.3 11.5 11.6 10.9 12.6 7.9 5 1917 11.7 12.0 12.0 12.6 12.8 13.0 12.8 13.0 13.3 13.5 13.5 13.7 12.8 18.1 17.4 6 1918 14.0 14.1 14.0 14.2 14.5 14.7 14.1 14.0 14.2 14.5 14.7 15.1 15.1 15.7 16.0 16.3 16.5 15.1 20.4 18.0  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -