Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code generation in R packages - R-hub blog #72

Open
utterances-bot opened this issue Feb 11, 2020 · 4 comments
Open

Code generation in R packages - R-hub blog #72

utterances-bot opened this issue Feb 11, 2020 · 4 comments

Comments

@utterances-bot
Copy link

Code generation in R packages - R-hub blog

https://blog.r-hub.io/2020/02/10/code-generation/

Copy link

Interesting post and twitter discussion! I came across R code generation when working with the Google APIs since all the libraries can be generated from Google’s Discovery API. googleAuthR will generate working R functions and put them in a package that may even pass a CRAN CMD check - however usually a bit of tweaking is needed to make them more usable by humans. But for documentation alone it’s a good basis to start from.

@maelle
Copy link
Member

maelle commented Feb 11, 2020

Thanks, what a cool example, and I see you've even written a whole article "Building your own Google R library
"
!

Copy link

kent37 commented Feb 15, 2020

The analysis addin in my phenoptrReports package takes user input and generates a script to perform a data analysis. This is a bit of a different use case than any you present here. The code is pretty clunky - a lot of glue::glue and conditional code. I would love to find a better way to do it.

Copy link

nfultz commented Feb 18, 2020

Literate programming also relies on some similar methods to extract and generate code from documents; actually, the compiler package is probably the most-used literate program in circulation right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants