Closed Evaporater closed 1 year ago
Hi - I've never seen this issue before. Do you have a small dataset and example that reproduces the error?
i am sorry that i don't know how to share my data directly to you via github, so i upload it to dropbox, the url is https://www.dropbox.com/s/57nq6eodq2g024q/test.RData?dl=0
, i hope it works.
this data is generated following your tutorial on https://jean997.github.io/cause/ldl_cad.html#Step_1:_Format_Data_for_CAUSE
.
you can reproduce my analysis using following code:
>load(test.RData)
>cause::cause(X=X, variants = top_vars, param_ests = params)
in my case, it returns:
Estimating CAUSE posteriors using 726 variants.
Fitting confounder only model.
Setting ranges
Refining grid
Error in `map()`:
ℹ In index: 1.
Caused by error in `.local()`:
! DLL requires the use of native symbols
further run rlang::last_trace(drop = FALSE)
, it returns:
<error/purrr_error_indexed>
Error in `map()`:
ℹ In index: 1.
Caused by error in `.local()`:
! DLL requires the use of native symbols
---
Backtrace:
▆
1. ├─cause::cause(X = X, variants = top_vars, param_ests = params)
2. │ └─cause::cause_grid_adapt(...)
3. │ └─cause:::adapt2_grid(...)
4. │ ├─base::unique(unlist(get_neighbors(ix, res, params)))
5. │ ├─base::unlist(get_neighbors(ix, res, params))
6. │ └─cause:::get_neighbors(ix, res, params)
7. │ ├─... %>% ...
8. │ └─purrr::map(...)
9. │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
10. │ ├─purrr:::with_indexed_errors(...)
11. │ │ └─base::withCallingHandlers(...)
12. │ ├─purrr:::call_with_cleanup(...)
13. │ └─cause (local) .f(.x[[i]], ...)
14. │ ├─intervals::interval_overlap(x[ix, ], x)
15. │ └─intervals::interval_overlap(x[ix, ], x)
16. │ └─intervals (local) .local(from, to, ...)
17. │ ├─intervals::which_nearest(from, to, check_valid)
18. │ └─intervals::which_nearest(from, to, check_valid)
19. │ └─intervals (local) .local(from, to, ...)
20. ├─purrr::map(...)
21. │ └─purrr:::map_("list", .x, .f, ..., .progress = .progress)
22. │ └─purrr:::vctrs_vec_compat(.x, .purrr_user_env)
23. ├─purrr::transpose(.)
24. └─base::.handleSimpleError(...)
25. └─purrr (local) h(simpleError(msg, call))
26. └─cli::cli_abort(...)
27. └─rlang::abort(...)
it seems that the problem comes from purrr package, but i don't know how to fix it... hope you can give me some tips, thank you
I have tried to replicate your error on two different computers and three different versions of R (including 4.3.0) but failed. It always runs fine for me. The only thing I can think of is that you have
locale:
[1] LC_COLLATE=Chinese (Simplified)_China.utf8
[2] LC_CTYPE=Chinese (Simplified)_China.utf8
[3] LC_MONETARY=Chinese (Simplified)_China.utf8
[4] LC_NUMERIC=C
[5] LC_TIME=Chinese (Simplified)_China.utf8
in your session info. It is possible that this is related to the issue. I haven't been able to test this (haven't figured out how to set my locale variables to Chinese). Perhaps you could try setting yours to English and see if that solves the issue?
Well, I don't think it's a language problem because it works fine on my colleague's computer. I tried to reinstall the cause
package but the problem still existed, so I reinstalled R and installed only the cause
package and the problem was solved, so I guess I might have lost something when I upgraded R or there was a conflict between one of the previous packages and cause
. Anyway, thanks for your reply!
Ok! Glad it is solved but sorry we couldn't figure out exactly the source of the issue. If you encounter it again feel free to reopen this issue.
when i run
cause
function, it returns following error:how can i fix it? thank you.