Excique um para loop line by line em r
debug(function_to_debug) # debug a function
# or
browser() # debug a for loop, place it inside
# then type "n" in the command to move to the next excecuted line
Rocku0