This task is difficult for me. I need to find the temp value for every one hour (minimum recorded time) of 30/31 days of a month. But, the sensor is measured the temp value at irregular periods (input file is attached as image). I want to write R code for this. Eg output:
1/6/2016 0.00 90.45
1/6/2016 1.01 92.54
1/6/2016 2.12 94.95
1/6/2016 21.53 95.85
A similar sample data frame:
sample <- data.frame( date = c(rep("2016-06-01", 13), NA, NA, rep("2016-06-01", 3), NA, NA, rep("2016-06-01", 3), NA, rep("2016-06-02", 2)), time = c("0:00", "0:10", "0:20", "0:30", "1:01", "1:11", "1:21", "1:31", "1:41", "1:51", "2:12", "2:42", "2:52", NA, NA, "12:03", "12:13", "12:23", NA, NA, "21:53", "21:54", "23:14", NA, NA, NA), temp = c(90.45, 91.29, 90.88, 91.22, 92.54, 92.57, 93.18, 93.9, 94.51, 94.37, 95.96, 95.32, 95.2, NA, NA, 95.37, 95.52, 95.35, NA, NA, 95.85, 95.6, 96.14, NA, NA, NA) )
If anyone please help of How to do with R programming