[R] convert 12 time stamp to 24 hour

Rui Barradas ruipbarradas at sapo.pt
Mon Feb 11 14:40:50 CET 2013


Hello,

You're trying to plot the df, not the column. Try

plot(testdata ~ testtimedataset$V1)


Hope this helps,

Rui Barradas

Em 11-02-2013 13:30, e-letter escreveu:
> Readers,
>
> Have since tried to plot converted 24 hour data:
>
> testtimedataset
>          V1
> 1 13:01:41
> 2 13:02:10
> 3 13:02:38
> 4 13:03:05
> 5 13:03259
>
>> testdata<-seq(1:5)
>> plot(testdata~testtimedataset)
> Error in function (formula, data = NULL, subset = NULL, na.action = na.fail,  :
>    invalid type (list) for variable 'testtimedataset'
>
> Was expecting to see a graph with ordinate values 1:5 for the time
> series values on the abscissa. What is the mistake please?
>
> --
> r2151
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list