I have some form data:
date,time,val1,val2
20090503,0:05:12,107.25,1
20090503,0:05:17,108.25,20
20090503,0:07:45,110.25,5
20090503,0:07:56,106.25,5
which comes from the csv file. I'm relatively new to R, so I tried
data <-read.csv("sample.csv", header = TRUE, sep = ",")
and using POSIXltas well as POSIXctin the argument colClasses, but I don't seem to be able to create a single column or “variable” from my date and time data. I want to do this, so I can choose arbitrary time frames for calculating current statistics, such as max, min, mean (and then boxplots, etc.).
I also thought that I could convert it to a time series and go around it in such a way
dataTS <-ts(data)
but so far I have managed to use the beginning, end and frequency. Thank you for your help.
source
share