我正在尝试自动检测目录中最后修改的文件。然而,从
file_info
包调用 fs
所产生的小标题与我正在使用的一些 dplyr 函数不能很好地配合。有人有意见吗?
谢谢!
library(tidyverse)
write.csv(data.frame(test = 1),"test.csv")
write.csv(data.frame(test = 1),"test2.csv")
date <- list.files(".", pattern = "test", full.names = T) |>
fs::file_info() |>
ungroup() |>
as_tibble() |>
pluck(path)
## does not return a character vector of length 2 as I would expect
我的错。我应该用过
dplyr::pull
不是
purrr:pluck