Closed blasp closed 6 years ago
I have been using the time series plot for a while. It works great with a dataset i got but retrives an error on the another.
My dates has been converted from as.Date to as.POSIXct looking like this
Dataset A: OK str(DatasetA) Date : Date, format: "2013-05-01" "2013-05-02" Date2: POSIXct, format: "2013-05-01 10:00:00" "2013-05-02 10:00:00" Values: int 16025 15740 21351
Dataset B: Not OK str(DatasetB) Date: Date, format: "2017-02-26" "2017-02-25" Date2: POSIXct, format: "2017-02-26 11:00:00" "2017-02-25 11:00:00" Values : int 710468 691453 649389
When i try to do a time series it works a treat on Dataset A but not in Dataset B
amTimeSeries(datasetB, 'Date2', c('Value'), linewidth = c(2), linetype = c(1), bullet = c('round'), color = c('orange'))
Error in if (ref_period$seconds[minperiod + 1] != diffTime) { : missing value where TRUE/FALSE needed
Could this error be related to the encoding in my original csv file ?
The issue is at my end.
Probably an encoding issue with google sheets. I bypassed google sheet by extracting this data directly from source and is working ok
I have been using the time series plot for a while. It works great with a dataset i got but retrives an error on the another.
My dates has been converted from as.Date to as.POSIXct looking like this
Dataset A: OK str(DatasetA) Date : Date, format: "2013-05-01" "2013-05-02" Date2: POSIXct, format: "2013-05-01 10:00:00" "2013-05-02 10:00:00" Values: int 16025 15740 21351
Dataset B: Not OK str(DatasetB) Date: Date, format: "2017-02-26" "2017-02-25" Date2: POSIXct, format: "2017-02-26 11:00:00" "2017-02-25 11:00:00" Values : int 710468 691453 649389
When i try to do a time series it works a treat on Dataset A but not in Dataset B
amTimeSeries(datasetB, 'Date2', c('Value'),
linewidth = c(2),
linetype = c(1), bullet = c('round'), color = c('orange'))
Error in if (ref_period$seconds[minperiod + 1] != diffTime) { : missing value where TRUE/FALSE needed
Could this error be related to the encoding in my original csv file ?