Objective: Create a data frame where:
- each row is corresponding with a unique id (site_no) and time stamp (startDateTime)
- each column is identified by a parameter id (parm_cd)
This is what my data currently looks like:
myData <- structure(list(site_no = c(1362370, 1362370, 1362370, 1362370, 1362370, 1362370, 1362370, 1362370, 1362370, 1362370), parm_cd = c(602L, 610L, 613L, 618L, 71845L, 71856L, 602L, 610L, 618L, 71845L), result_va = c(0.601, 0.028, 0.028, 0.728, 0.036, 0.092, 0.68, 0.028, 0.705, 0.036), startDateTime = c("2006-11-01 10:46:00", "2006-11-01 10:46:00", "2006-11-01 10:46:00", "2006-11-01 10:46:00", "2006-11-01 10:46:00", "2006-11-01 10:46:00", "2006-11-01 10:47:00", "2006-11-01 10:47:00", "2006-11-01 10:47:00", "2006-11-01 10:47:00")), row.names = c(NA, 10L), class = "data.frame")
This is what I would like the data to look like: