Request: Reverse direction of lookup()
Nobody has claimed this yet.
- Dominant language
- R
- Stars
- 1.1k
- Forks
- 266
- Avg merge
- 2h 56m
- Merged PRs (30d)
- 1
Description
Summary:
lookup() currently translates from an R function to a Stan function. It would be nice to allow the converse, translating from a Stan function to an R function.
Description:
I am working on an R package (blavaan) where I know the prior on each model parameter in Stan syntax, and I want to use R to generate random initial values from the prior. So I'd like to do the reverse of lookup(): I'd like to start with something like normal() and convert to dnorm(). This is easy to do with the rosetta object, but that object is not exported in rstan (so cannot be legally used by other packages). I see at least two possibilities here:
- Export
rosettaso that it can be used by other packages. - Add an argument to
lookup()to tell it the desired direction (from R to Stan or from Stan to R).
If the second option is more desirable, I am happy to work on a pull request.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing lookup() interface and the unexported rosetta object described in the issue. Determine whether the public API should export rosetta or support Stan-to-R translation, and consider the issue complete when external R packages can perform the requested reverse lookup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- r
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100