[英]R purrr pmap Can't pluck from a closure
我在這里做錯了什么?:
library(tidyverse)
calling_dataset <- tibble(filepath="xxx.csv")
testfunction1 <-
getdrugdata <- function(filepath){
print(filepath)
}
test1 <- calling_dataset %>%
purrr::pmap_df(list(
.$filepath), testfunction1)
由此產生的錯誤是:錯誤:無法從閉包中拔出。
更改調用:
purrr::pmap_df(list(calling_dataset$filepath), testfunction1)
宇宙恢復秩序。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.