seq.default出错:错误登录' by'争论

时间:2017-03-11 20:14:41

标签: r

我在warbleR包中使用specan函数。我将数据帧作为第一个参数传递:

> dfram
sound.files selec     start       end
1  combined.wav   1-1  1.355985  2.082049
2  combined.wav   1-2  2.255236  3.277800
3  combined.wav   1-3  3.326175  3.715613
4  combined.wav   1-4  4.401239  5.181053
5  combined.wav   1-5  5.219428  6.062491
6  combined.wav   1-6  6.198241  6.557867
7  combined.wav   1-7  6.761805  7.475555
8  combined.wav   1-8  7.700681  7.720493
9  combined.wav   1-9  7.808243  7.913994
10 combined.wav  1-10  9.432433 11.048685
11 combined.wav  1-11 11.302560 12.403499
12 combined.wav  1-12 14.304127 16.789755
13 combined.wav  1-13 18.258944 19.555946
14 combined.wav  1-14 21.373323 24.397577
15 combined.wav  1-15 25.322140 28.434769
16 combined.wav  1-16 29.318708 31.703398
17 combined.wav  1-17 33.231588 36.347154
18 combined.wav  1-18 38.280157 41.536661
19 combined.wav  1-19 43.434038 46.607605
20 combined.wav  1-20 48.368232 50.659610

整个函数调用是:

specan(dfram,path="path to folder", bp=c(0,16))

这会产生以下错误:

Error in seq.default(1, n - wl, wl - (ovlp * wl/100)) : 
wrong sign in 'by' argument
In addition: Warning messages:
1: In if (bp != "frange") { :
the condition has length > 1 and only the first element will be used
2: In if (bp == "frange") bp <- c(X$low.f[i], X$high.f[i]) :
the condition has length > 1 and only the first element will be used
3: In if (bp == "frange") bp <- c(X$low.f[i], X$high.f[i]) :
the condition has length > 1 and only the first element will be used
4: In if (bp == "frange") bp <- c(X$low.f[i], X$high.f[i]) :
the condition has length > 1 and only the first element will be used
5: In if (bp == "frange") bp <- c(X$low.f[i], X$high.f[i]) :
the condition has length > 1 and only the first element will be used
6: In if (bp == "frange") bp <- c(X$low.f[i], X$high.f[i]) :
the condition has length > 1 and only the first element will be used
7: In if (bp == "frange") bp <- c(X$low.f[i], X$high.f[i]) :
the condition has length > 1 and only the first element will be used
8: In if (bp == "frange") bp <- c(X$low.f[i], X$high.f[i]) :
the condition has length > 1 and only the first element will be used
9: In if (bp == "frange") bp <- c(X$low.f[i], X$high.f[i]) :
the condition has length > 1 and only the first element will be used

任何帮助都将不胜感激。

0 个答案:

没有答案