Closed Non-Contradiction closed 6 years ago
There seems little we can do about this issue.....
After investigation, we can get around the issue by using for (i in as.list(x))
instead of for (i in x)
in the function that we want to apply automatic differentiation. Although there is some performance issue with the approach and is a little inconvenience, it should work with all native R functions.
If we use
for (i in x)
wherex
is some input vector, we will get errors likeinvalid for loop sequence
.The related test is currently commented out. Currently have no idea about how to fix this issue. Doing experimentation about this.