0

I have these 2 columns in 1 column I have the date and time and the other column reading of the device. I am using xts to convert the time series into xts object but after converting I am not able to plot the time series and I am getting x before the date. and the error 'x' must be a time-series object. i have even used as.POSIXct(x, format = "%d.%m.%Y %H:%M:%OS") but still I am getting an error.

X2020.10.13.09.54.00 0.165 X2020.10.13.09.54.30 0.166 X2020.10.13.09.55.00 0.166 X2020.10.13.09.55.30 0.166 X2020.10.13.09.56.00 0.166 X2020.10.13.09.56.30 0.166 X2020.10.13.09.57.00 0.166 X2020.10.13.09.57.30 0.166 X2020.10.13.09.58.00 0.166 X2020.10.13.09.58.30 0.166 X2020.10.13.09.59.00 0.166

M--
  • 25,431
  • 8
  • 61
  • 93
CH_A_M
  • 33
  • 7

1 Answers1

0

The problem is solved. I have figured it out. I still have X in my View data but the error ' the error 'x' must be a time-series object' is gone. The problem was my numbers were in character form. So, I have converted them to numeric form and now I am able to have time series and plots.

CH_A_M
  • 33
  • 7