Hi guys,
I'm new to R for like a month, so still in the learning phase.
I got a piece of code that is working at win 7, and we tested and ran the code smoothly last week. But that computer has already been updated to win 10 this week, and unfortunately, I have to rerun the code on win 10.
So here is what I got, when I ran:
> idx_fraud_train <- fraud_latest %>% Split.train.test(train_proportion, group_var="idx_UAN", stratify_var="FRAUD_TYPE", category_var="IS_CUSTOMER", by_category="NO")
and the result is:
`summarise()` ungrouping output (override with `.groups` argument)
Error: Join columns must be unique.
x Problem at position 2.
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/rlang_error>
Join columns must be unique.
x Problem at position 2.
Backtrace:
9. global::Split.train.test(...)
10. dplyr::left_join(., y = groups, by = c("GROUP_VAR", "GROUP_VAR"))
20. dplyr:::join_mutate(...)
21. dplyr:::join_cols(...)
22. dplyr:::standardise_join_by(by, x_names = x_names, y_names = y_names)
23. dplyr:::check_join_vars(by$x, x_names)
Run `rlang::last_trace()` to see the full context.
> rlang::last_trace()
<error/rlang_error>
Join columns must be unique.
x Problem at position 2.
Backtrace:
x
1. \-`%>%`(...)
2. +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
3. \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
4. \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
5. \-`_fseq`(`_lhs`)
6. \-magrittr::freduce(value, `_function_list`)
7. +-base::withVisible(function_list[[k]](value))
8. \-function_list[[k]](value)
9. \-global::Split.train.test(...)
10. \-temp_data %>% left_join(y = groups, by = c("GROUP_VAR", "GROUP_VAR")) 00 functions and libraries v2.4.R:114:2
11. +-base::withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
12. \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
13. \-base::eval(quote(`_fseq`(`_lhs`)), env, env)
14. \-`_fseq`(`_lhs`)
15. \-magrittr::freduce(value, `_function_list`)
16. +-base::withVisible(function_list[[k]](value))
17. \-function_list[[k]](value)
18. +-dplyr::left_join(., y = groups, by = c("GROUP_VAR", "GROUP_VAR"))
19. \-dplyr:::left_join.data.frame(...)
20. \-dplyr:::join_mutate(...)
21. \-dplyr:::join_cols(...)
22. \-dplyr:::standardise_join_by(by, x_names = x_names, y_names = y_names)
23. \-dplyr:::check_join_vars(by$x, x_names)
Sorry, I'm really confusing at the moment, could anyone help in solving this issue? Thanks!