绘制 R 中的波动
我会尽量不那么含糊。下面的数据集由设备的功率测量组成,我必须绘制一个图表,该图表将显示“时间”列中功率(瓦特)的平均波动。我必须在 R 中完成此操作,但我真的不知道哪个函数或应该如何执行它,因为我是 R 的新手。任何帮助将不胜感激!
Store No.,Date,Time,Watt
33,2011/09/26,09:11:01,0.0599E+03
34,2011/09/26,09:11:02,0.0597E+03
35,2011/09/26,09:11:03,0.0598E+03
36,2011/09/26,09:11:04,0.0596E+03
37,2011/09/26,09:11:05,0.0593E+03
38,2011/09/26,09:11:06,0.0595E+03
39,2011/09/26,09:11:07,0.0595E+03
40,2011/09/26,09:11:08,0.0595E+03
41,2011/09/26,09:11:09,0.0591E+03
I will try to be as less vague as possible. The below data set consists of a device's power measurement and I have to plot a graph which would show the average fluctuation of the power (watt) during the Time column. I have to accomplish this in R but i really don't know which function or how should I do it as i'm a newbie to R. Any help will be highly appreciated!
Store No.,Date,Time,Watt
33,2011/09/26,09:11:01,0.0599E+03
34,2011/09/26,09:11:02,0.0597E+03
35,2011/09/26,09:11:03,0.0598E+03
36,2011/09/26,09:11:04,0.0596E+03
37,2011/09/26,09:11:05,0.0593E+03
38,2011/09/26,09:11:06,0.0595E+03
39,2011/09/26,09:11:07,0.0595E+03
40,2011/09/26,09:11:08,0.0595E+03
41,2011/09/26,09:11:09,0.0591E+03
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
package:zoo 中的
rollapply
将返回移动平均线(或移动任意函数)。您可以使用点进行绘图,然后添加移动平均线:rollapply
in package:zoo will return a moving average (or a moving any-function). You can plot using points and then add a moving average line: