在r-如何绘制来自日期==&#x27 q1 q1的行中的数据。到数据框的最后一行?
数据的示例:
日期 | 通货膨胀 |
---|---|
2020 Q1 | 2 |
2020 Q2 | 2.1 |
2020 Q3 | 2 |
2020 Q4 | 2.1 |
i使用ggplot ggplot(cpi,aes,aes(x = date,y = enpertation,y = enpertation,group = 1))+geom_line())+geom_line()< /code>,但我只想从包含日期= 2020 Q1的任何行号中绘制直到集合的最后一行(当我从网站上获取Webscrap的数据时,每次都会更改)。
example of the data:
Date | Inflation |
---|---|
2020 Q1 | 2 |
2020 Q2 | 2.1 |
2020 Q3 | 2 |
2020 Q4 | 2.1 |
I am using ggplot ggplot(CPI,aes(x=date,y=inflation,group=1))+geom_line()
but I would like to only plot from whichever row number that contains date= 2020 Q1 until the last row of the set (which will change everytime as I am getting webscraping the data from a website).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论