Closed ian-coccimiglio closed 4 months ago
I think the issue is either in the rosetta formatting or the matching of the lookup function. The function uses rosetta[matches, -1, drop = FALSE] and drops the first column of the output, which are the Stan function names, rather than dropping the second column of R function names.
@ian-coccimiglio thanks for bringing this to our attention. That's strange! @bgoodri I guess the columns in rosetta
changed order by mistake at some point? Simplest solution seems to be to just change to rosetta[matches, -2, drop = FALSE]
(or better yet, drop using the column name).
I made a PR: https://github.com/stan-dev/rstan/pull/1113
Summary:
The lookup function in R does not return Stan function names anymore, instead it only returns the name of the input R function.
Description
I think the issue is either in the rosetta formatting or the matching of the lookup function. The function uses rosetta[matches, -1, drop = FALSE] and drops the first column of the output, which are the Stan function names, rather than dropping the second column of R function names.
Reproducible Steps:
Use
lookup(dnorm)
orlookup("dnorm")
using rstan v2.32.5 (or any other R function).Current Output:
Expected Output:
See here for the original return value of the function.
RStan Version:
Rstan v2.32.5
R Version:
R version 4.3.0
Operating System:
Both macOSX and Manjaro linux.