如何根据日期、时间、LTP 形式的矩阵中的可用数据绘制 LTP 与时间的关系图

How to plot LTP vs. time from data available in a matrix in the form of Date, time, LTP

我有3列数据:(如下图

试试这个:

library(zoo)
z <- read.zoo("myfile.dat", header = TRUE, index = 1:2, format = "%Y%m%d %H:%M", tz = "")

# classic graphics
plot(z)

# ggplot2 graphics
autoplot(z)

备注

要为问题中提供的示例数据生成文件,试试这个;然而,只有一个点,你不会在折线图上看到任何东西。

cat("Date Time LTP\n20180102 09:16 1800", file = "myfile.dat")