nealrichardson commented on code in PR #13854:
URL: https://github.com/apache/arrow/pull/13854#discussion_r963710708
##########
r/tests/testthat/test-dplyr-funcs-datetime.R:
##########
@@ -166,15 +255,15 @@ test_that("strptime", {
"%S", "%q", "%M", "%U", "%w", "%W", "%y", "%Y", "%R", "%T"
)
formats2 <- c(
- "a", "A", "b", "B", "d", "H", "j", "m", "Om", "T", "OS", "Ip",
+ "a", "A", "b", "B", "d", "H", "j", "m", "T", "OS", "Ip",
"S", "q", "M", "U", "w", "W", "y", "Y", "r", "R", "Tz"
)
base_format <- "%Y-%m-%d"
base_format2 <- "ymd"
# Some formats are not supported on Windows
if (!tolower(Sys.info()[["sysname"]]) == "windows") {
- formats <- c(formats, "%a", "%A", "%b", "%B", "%Om", "%OS", "%I%p", "%r",
"%T%z")
+ formats <- c(formats, "%a", "%A", "%b", "%B", "%OS", "%I%p", "%r", "%T%z")
}
for (fmt in formats) {
Review Comment:
Looking at https://testthat.r-lib.org/reference/quasi_label.html, I worked
out that you can do this:
```
mutate(!!fmt := strptime(etc.))
```
(!! before fmt, and := instead of =) and it makes the column names like
`actual$%Y-%m-%d %H`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]