I am using dplyr 1.0.6 and R 4.1.0 and I wrote 2 functions as follows:
AllCustomersList <- loadAllCustomersData()
CouldJoinByNationalID <- matchCustomersByNationalCode(AllCustomersList = AllCustomersList)
loadAllCustomersData() returns a list of two data frames, then the matchCustomersByNationalCode tries to execute a semi_join on those two data.frame as follows:
matchCustomersByNationalCode <- function(AllCustomersList) {
FDCustomers <- AllCustomersList$FDCustomers
Customers <- AllCustomersList$Customers
semi_join(x = FDCustomers, y = Customers, by = c("NationalID" = "NationalCode"), na_matches = "never") %>%
pull(NationalID) %>%
return()
}
Actully this is just a wrapper for semi_join as matter of naming. But it throughs an error that says :
Error:
x
andy
must share the same src, setcopy
= TRUE (may be slow).
Run
rlang::last_error()
to see where the error occurred.
Called from: signal_abort(cnd)
could anyone help with this?