Scott Kostyshak
2017-Sep-18 03:09 UTC
[Rd] specifying name in the error message "promise already under evaluation"
Consider the following R code: abc <- function(x, y = y) { x + y } abc(x = 3) which gives the following error: promise already under evaluation: recursive default argument reference or earlier problems? If you google that error, you will find that it usually refers to the situation given in the example above, although I'm sure the error is more general and could be triggered in other situations. I'm trying to think about how to improve the error for the most common situation that triggers it. One simple way would be to give the name of the promise. For example, I think that the following would already be an improvement: promise "y" already under evaluation: recursive default argument reference or earlier problems? Any thoughts? Scott -- Scott Kostyshak Assistant Professor of Economics University of Florida https://people.clas.ufl.edu/skostyshak/