maRce10 / warbleR

streamline acoustic analysis in R
https://marce10.github.io/warbleR/
GNU General Public License v3.0
52 stars 21 forks source link

spectro_analysis error on Windows #49

Closed jkvrtilek closed 2 years ago

jkvrtilek commented 2 years ago

When spectro_analysis is run on my Windows computer, it throws the following error: Error in pblapply_wrblr_int(X = 1:nrow(X), cl = cl, pbar = pb, FUN = function(i) { : 'list' object cannot be coerced to type 'double'

This occurs both when using an extended selection table and when writing the wavs out and using a data frame. The same code functions on both Linux and Mac systems. R version and all relevant packages are up to date.

In linked Google drive folder: 3 WAVs 3 selection tables example code error screenshot https://drive.google.com/drive/folders/1pCXmiDo6zMvKemnuHywO0JbdiRt5A37I?usp=sharing

maRce10 commented 2 years ago

I tried the code on linux and worked fine, as you said. I also tried on windows and got the same error. The problem is with parallelization (as usually on windows). I used parallel = 1 and it worked fine. Will try to fix the issue. The NAs for harmonic measurements is expected with such a short signals (mean duration 0.009 s).