Error in 2:n : NA/NaN argument

Error in 2:n : NA/NaN argument.

This means that one (or both) of the two arguments of : are NA or NaN2 is not, so n must be.

In your question you don’t show how you created the variable n, but if it was the result of some data that was NA, or a division by zero result for example, that would cause these errors.

Leave a Comment