Skip to content

Commit

Permalink
Merge pull request #1 from agostof/fix/compatibility
Browse files Browse the repository at this point in the history
timestamped filename computation with non-piped base-R equivalent
  • Loading branch information
awkena authored Jan 25, 2024
2 parents 5241772 + 424bbd3 commit 9e6f3d6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions R/all_new_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -980,8 +980,7 @@ field_label <- function(dat,
}

# File name and timestamp for updated fieldbook
ts <- Sys.time() |> format(format = "%H_%M_%S") |>
paste0("Updated_Fieldbook_", ... = _, ".csv")
ts <- paste0("Updated_Fieldbook_", format(Sys.time(), format = "%H_%M_%S"), ".csv")

utils::write.csv(updat, file = paste0(filename, ts), row.names = FALSE)

Expand Down Expand Up @@ -1231,8 +1230,7 @@ gp_label <- function(dat,
}

# File name and timestamp for updated fieldbook
ts <- Sys.time() |> format(format = "%H_%M_%S") |>
paste0("Updated_Fieldbook_", ... = _, ".csv")
ts <- paste0("Updated_Fieldbook_", format(Sys.time(), format = "%H_%M_%S"), ".csv")

utils::write.csv(updat, file = paste0(filename, ts), row.names = FALSE)

Expand Down

0 comments on commit 9e6f3d6

Please sign in to comment.