帮助学生在使用Raspberry Pi温度传感器启动气象气球后分析他们的数据。尝试在R中为它们编写一些代码,以允许它们绘制下载的数据。将编写一份csv&保存。我已经把一些代码放在一起,无法弄清楚如何将日期时间转换为正确的格式。这就是我到目前为止(附加了R控制台的图像)......
library(lubridate) # loads package to convert data in csv to dateTime format
myData <- read.csv(file="test_temp.csv") # load csv file and call it myData
head (myData$dateTime) # view the date time data (as Levels)
new.dateTime <- as.POSIXct(myData$dateTime, format = "%m/%d/%Y %H:%M:%S") # convert to datetime data
head (new.dateTime) # view the new format - not working!
plot(Temp ~ new.dateTime, data) # also not working