Hi I have data in the form of state names and values in dates from 4/1/20..... to last date. Now I need to a create a timeline chart of all states showing x axis as date range from 4/1/20 to last available date and Y axis the values with line chart for each state.
Could someone help me pls.
Data.Table: Cancer_tab
|States |4/1/20|4/2/20|4/3/20|4/4/20|4/5/20|4/6/20|4/7/20|4/8/20|4/9/20|4/10/20|.......
|Alabama |1060 |1233 |1495 |1614 |1765 |1952 |2169 |2328 |2703 |2947|
|Alaska |132 |143 |157 |171 |185 |190 |213 |226 |235 |246|
|Arizona |1413 |1596 |1769 |2019 |2269 |2460 |2575 |2726 |3018 |3112|
|Arkansas |584 |643 |704 |743 |837 |875 |946 |1000 |1119 |1171|
|California |9399 |10773|1204|1287 |150 |16019|17351|18897|19710 |21081|
|Colorado |3342 |3728 |4173|4565 |4950 |5183 |5429 |5655 |6202 |6513|
I tried using
matplot(y=USCovid_t,type="l",lty = 1, xlab= colnames(Cancer_tab[-1]),
I am getting following error: "In xy.coords(x, y, xlabel, ylabel, log) : NAs introduced by coercion"
Also I need the values to be divided by 100 to make the y-axis scalable. and the x-axis is plotting some values, instead of date range.
Please suggest how to resolve this.