tidyverse / multidplyr

A dplyr backend that partitions a data frame over multiple processes
https://multidplyr.tidyverse.org
Other
641 stars 75 forks source link

Error in checkForRemoteErrors(lapply(cl, recvResult)) ... could not find function #15

Closed danpbowen closed 8 years ago

danpbowen commented 8 years ago

I have a column in a tbl_df that is a character vector and I am trying to convert it from a string like, "20151001", to a ymd(tzone="UTC"). It's as if I need the lubridate library ?loaded on each node of the cluster?, which doesn't make much sense to me if that's the case.

Here is the error I get:

data.frame(date = rep('20151001', 10000)) %>% tbl_df %>% partition(cluster=create_cluster(2)) %>% mutate(date = ymd(date, tzone = 'UTC'))

Initialising 2 core cluster. Error in checkForRemoteErrors(lapply(cl, recvResult)) : 2 nodes produced errors; first error: could not find function "ymd"

jmorten commented 8 years ago
data.frame(date = rep('20151001', 10000)) %>%
    tbl_df %>%
    partition(cluster=create_cluster(2)) %>%
    mutate(date = lubridate::ymd(date, tzone = 'UTC'))
hadley commented 8 years ago

Yes. Every package you need must be loaded in every node.

WentingCao commented 6 years ago

Hi, I encountered the same error too, but I still don't know how to revise the codes to successfully apply my own function. Any suggestion from you is appreciated.