This works all the time when pasted into the command line separately withOUT for loop:
sprintf("Your maximum allowed investment for a period of %g years in the first year equals %g", current_nr_of_years, max_invest_year_zero_vec[current_nr_of_years])
This does not print any output when run in the for loop from the script file... :
loop_index_vec
for (current_nr_of_years in loop_index_vec) {
sprintf("Your maximum allowed investment for a period of %g years in the first year equals %g", current_nr_of_years, max_invest_year_zero_vec[current_nr_of_years])
# browser()
}