Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
R中是否有累积图包?或者我如何在 R 中创建累积图?例如,给定值 2、4、2、2,它们的值应在此处绘制为 2、6、8、10 d3 示例。然后像其他累积记录一样形成阶梯模式
根据?plot.default- 有一个“楼梯”绘图方法,可以结合它cumsum()给出你想要的结果我认为:
?plot.default
cumsum()
plot(cumsum(c(2,4,2,2)), type="s")