开发者

How do I subset and manipulate time series data with lubridate and dplyr in Rstudio?

I have loaded in time series data of creek depth and am needing to calculate total annual values (Oct-April) for each year. The following is what I have tried thus far:

depth <- read_csv("Depth.Water_Depth-_All_Instruments@GCNP_-_Robber's_Roost_Spring.EntireRecord .csv") 

The following is a screenshot of the resu开发者_如何学Clting data frame enter image description here

These are my attempts at making the timestamp column (ISO_UTC) into a date class. Although, each attempt makes all values for ISO_UTC into N/A values instead of dates / times.

ymd_hm(depth$ISO_UTC)

depth$ISO_UTC<- as.Date(depth$ISO_UTC, format = "%Y-%m-%dT%H:%M")

depth$ISO_UTC<- as.POSIXct(depth$ISO_UTC, format = "%Y-%m-%d %H:%M", tz = "US/Pacific")

Please help me to put these data into usable datetime values.

Please see the above details.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜