Help with: Error in seq.default(1, nchr, by = ncycle) : invalid '(to - from)/by'

Narrowly, that’s an error from the seq() function (here is its documentation). It has been called with the following parameters:

  • from = 1
  • to = nchr
  • by = ncycle

seq() produces regular sequences of numbers. When calling it with these arguments, it tries to produce a sequence from 1 to nchr, with an increment of ncycle — so (nchr - 1) / ncycle needs to be a number that makes sense. The error message is saying that this is not the case.

Broadly, you didn’t call this function yourself. It appears to be part of the internal operations of FarmCPU(). So understanding this specific error isn’t that helpful. Something is wrong further upstream that is causing this part of FarmCPU’s code to get called with invalid values for either nchr or ncycle.

I’m afraid I don’t know enough about this package to get much further than that. Maybe someone else with more experience with it will stop by! Otherwise, if you’ve consulted the documentation and compared it to your code to check for mistakes in how you’re using the function and you’re still getting the error, you might try posting a question to the mailing list for this package: https://groups.google.com/forum/#!forum/gapit-forum

2 Likes