如何在 R 中按时间步长求解线性插值数据:(list) object cannot be coerced to type 'double'
How to solve a linear interpolation data by time step in R : (list) object can not be coerced to type 'double'
我在一个文件下有瞬时排水量的数据data.txt(数据如下)
(list) object can not be coerced to type 'double'
I think the problem is due to the format of the dates, please how to solve this problem?
write.table(TAB4, file="Q.txt", sep=";",quote=FALSE,row.names=FALSE)
需要进行两项更改。 list
问题可以通过将 x 转换为 POSIXct
而不是代码第 6 节中的 POSIXlt
来解决:x=as.POSIXct(TAB3$V1)
.
然后,在第 7 部分中,从 x 和 y 中删除 NA
值:TAB4=approx(x[-z],y[-z], xout= x[z])
。
在下面这行 pTAB4
中也有一个虚假的 p 看起来是错误的。
我在一个文件下有瞬时排水量的数据data.txt(数据如下)
(list) object can not be coerced to type 'double' I think the problem is due to the format of the dates, please how to solve this problem?
write.table(TAB4, file="Q.txt", sep=";",quote=FALSE,row.names=FALSE)
需要进行两项更改。 list
问题可以通过将 x 转换为 POSIXct
而不是代码第 6 节中的 POSIXlt
来解决:x=as.POSIXct(TAB3$V1)
.
然后,在第 7 部分中,从 x 和 y 中删除 NA
值:TAB4=approx(x[-z],y[-z], xout= x[z])
。
在下面这行 pTAB4
中也有一个虚假的 p 看起来是错误的。