This is a bit of a shot in the dark, but I have a script that does exactly what I expect it to do, yet, at the very end of the script I get an error like this:
Error in `[<-.data.frame`(`*tmp*`, "label", value = c(1L, 0L)) :
replacement has 2 rows, data has 0
In terms of an answer, I'm looking for general suggestions on how to track errors like this in R, best practices for using loops and double checking that they "made it through".
Any thoughts, suggestions, or past experiences that could relegate or inform an error message like this?