Skip to content

Commit

Permalink
use better variable name, dont convert time columns
Browse files Browse the repository at this point in the history
  • Loading branch information
andypicke committed May 5, 2024
1 parent 837effe commit d76235c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions R/process_coagmet_data_csv_daily.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ process_coagmet_data_csv_daily <- function(df) {
df2$date <- lubridate::mdy(df2$date)

# convert gust time into date-time format
df2$gust_time2 <- lubridate::ymd_hm(paste(df2$date, df2$gust_time))
df2$gust_datetime <- lubridate::ymd_hm(paste(df2$date, df2$gust_time))

# convert data columns from character to numeric
# TO-DO: de-select columns ending in 'time'
df2 <- df2 |>
dplyr::mutate(dplyr::across(
-c("station", "date", "gust_time", "gust_time2"),
-c("station", "date", "gust_time", "gust_datetime", dplyr::ends_with('_time')),
as.numeric
))

Expand Down

0 comments on commit d76235c

Please sign in to comment.