I was running a report that accidentally tried to pass a dataframe with zero rows to htmlTable(). That generated the following error: Error in css.cell[row_nr, ] : subscript out of bounds.
I added error trapping to my code, but you should consider seq_along instead of for (nr in 1:nrow(x)).
thanks for a great package.