thierrygosselin / assigner

Population assignment analysis using R
http://thierrygosselin.github.io/assigner
GNU General Public License v3.0
17 stars 6 forks source link

Error while using the subsampling option in Fst_WC84() #21

Closed usmart31 closed 4 years ago

usmart31 commented 4 years ago

Hi, I am interested in using the Fst_WC84() with subsampling. However, while getting familiar with your function by using datasets provided by you, I am running into the following error :

**library(assigner) data <- data_assigner_sim_01 assigner::fst_WC84(data, filename = "Test", subsample = 36, iteration.subsample = 20)

Error: Argument 1 must have names

  1. stop(structure(list(message = "Argument 1 must have names", call = NULL, cppstack = NULL), class = c("Rcpp::exception", "C++Error", "error", "condition")))
  2. bindrows(x, .id)
  3. dplyr::bind_rows(res$pairwise.fst.subsample)
  4. eval(lhs, parent, parent)
  5. eval(lhs, parent, parent)
  6. dplyr::bind_rows(res$pairwise.fst.subsample) %>% dplyr::group_by(POP1, POP2) %>% dplyr::summarise_all(.tbl = ., .funs = mean, na.rm = TRUE) %>% dplyr::mutate(ITERATIONS = rep(iteration.subsample, n())) at fst_WC84.R#649
  7. assigner::fstWC84(data, filename = "Test", subsample = 36, iteration.subsample = 20 )**

I have read other reports about a similar issue, but that is all in the context of assignment analysis and not Fst calculations. Is this a bug or am I missing something here?

Thank you,

P.S. The function runs just fine without the subsampling argument.

thierrygosselin commented 4 years ago

Should work now, make sure you have dplyr v. 1.0.0 installed Re-open the issue if you're still having problems