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

interest in an rmarkdown::render pull request? #152

Open
rmflight opened this issue Feb 17, 2017 · 5 comments
Open

interest in an rmarkdown::render pull request? #152

rmflight opened this issue Feb 17, 2017 · 5 comments

Comments

@rmflight
Copy link

I've just started using remake, and it is awesome. Given that rmarkdown has really nailed going from Rmd to PDF, HTML, etc, I was thinking it would be worth having a type similar to knitr: TRUE, but would be rmarkdown: TRUE that would call rmarkdown::render to generate the target, and keep track of when the input file changes.

Looking at the remake_from_knitr code, I don't think it should be too hard.

Would such a PR be of interest?

@richfitz
Copy link
Owner

Yes, that would be great, thanks. I am currently fairly ignorant of where the state-of-the-art is in this area, and would appreciate the help

@krlmlr
Copy link
Collaborator

krlmlr commented Feb 24, 2017

Can we work towards a more general rule system that allows custom rules? I'm thinking about something along the following lines:

rules:
  rmd_document:
    call: knit_with_deps(target_name, dep_names)

targets:
  reports/final.html:
    type: rmd_document
    depends:
    - reports/final.Rmd
    - dep1
    - dep2

Please see also #107 for thoughts on standalone execution of documents, and #130 (comment) for knit_with_deps().

@krlmlr
Copy link
Collaborator

krlmlr commented Feb 24, 2017

Or maybe:

rules:
  rmd_document:
    call: knit_with_deps(target_name, dep_names)
    dep_call: figure_out_additional_knitr_deps(dep_names)

targets:
  reports/final.html:
    type: rmd_document
    depends:
    - reports/final.Rmd

@richfitz
Copy link
Owner

👍 - totally agree

@rmflight
Copy link
Author

Yes, custom rules ultimately would be great! Especially because if done right a custom rule could generate anything, including holding the definition of a class defined in a custom package, and if the class changes, the code should be re-run .... (another use case I found yesterday)

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

No branches or pull requests

3 participants