I was intending to create an implementation of the Hungarian Algorithm in R but was baffled by the behavior of a reactive function which from debugging using print statement