I have a data.frame "df" such as:
df
Time T1 T2 T3
2015-02-20 04:00:00.00 128.0 136.5 27.6
2015-02-20 04:00:00.25 128.1 136.3 27.7
2015-02-20 04:00:00.50 128.3 136.2 27.7
2015-02-20 04:00:00.75 128.5 136.1 27.7
2015-02-20 04:00:01.00 128.6 136.1 27.7
2015-02-20 04:00:01.25 129.0 135.7 27.7
2015-02-20 04:00:01.50 129.1 135.6 27.8
2015-02-20 04:00:01.75 129.3 135.5 27.8
2015-02-20 04:00:02.00 129.5 135.5 27.8
2015-02-20 04:00:02.25 129.8 135.4 27.8
str(df)
#'data.frame': 10 obs. of 4 variables:
# $ Time: POSIXlt, format: "2015-02-20 04:00:00.00" "2015-02-20 04:00:00.25" "2015-02-20 04:00:00.50" "2015-02-20 04:00:00.75" ...
# $ T1 : num 128 128 128 128 129 ...
# $ T2 : num 136 136 136 136 136 ...
# $ T3 : num 27.6 27.7 27.7 27.7 27.7 27.7 27.8 27.8 27.8 27.8
I am trying to plot "T1", "T2", "T3" against "Time" using solution provided here
But the following error occurs:
mdf <- melt(df, id.vars="Time")
mdf
Error in round(secs, i) : non-numeric argument to mathematical function
In addition: Warning message:
In is.na(secs) : is.na() applied to non-(list or vector) of type 'NULL'