[R] inconsistency in tryCatch...

akshay kulkarni @k@h@y_e4 @end|ng |rom hotm@||@com
Wed Jun 22 21:00:38 CEST 2022

Dear members,
                          I have the following code:

        > tryCatch(function() print("fred"),  error = function(e) sum(1:3), finally = sum(1:3))
         function() print("fred")

The expected output from the tryCatch call should be to print "fred" to the console, and exit, but as seen above, it is outputting
          function() print("fred")

Can you people please shed some light on what is happening?

thanking you,
Yours sincerely,

	[[alternative HTML version deleted]]

More information about the R-help mailing list