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

Feature request: support for rmarkdown / YAML #12

Open
wouteroosterbosch opened this issue Mar 7, 2017 · 6 comments
Open

Feature request: support for rmarkdown / YAML #12

wouteroosterbosch opened this issue Mar 7, 2017 · 6 comments

Comments

@wouteroosterbosch
Copy link

As someone who often uses parameterized rmarkdown reports in a complicated directory structure (seperating team coding from reporting, I was a bit surprised to see the YAML not being parsed / taken into account.

While I presume it's possible to work around this by either manually setting parameters (when using ezknitr), or manually moving files (when using rmarkdown), the latter is currently less disruptive to a team's coding flow, imo.

What would need to happen to get the best of both worlds, or is this not a desired path?

@daattali
Copy link
Collaborator

daattali commented Mar 8, 2017

This is the case because when ezknitr was developed, YAML in Rmd files did not exist. I first brought up the idea for this package to Yihui over 2 years ago, much before the rmarkdown package had parameterized reports. The end of the README file does briefly touch on this point: when the package started out, parameters was a big advantage, but now that rmd has native support for that, the parameters feature is less important.

The package could certainly be updated to also work with YAML parameters, it just hasn't been done. If you're up for it, you're welcome to submit a PR :)

@asifzubair
Copy link

asifzubair commented Jun 15, 2017

So, does this mean that ezknitr will not parse the yaml header and create a title ? I am currently having this problem and a similar issue was posted on SO. Thanks!

@daattali
Copy link
Collaborator

ezknitr does not parse the YAML of an rmd file. I haven't tried using it lately soccer YAML became popular, so I don't know if it will still respect it in some way or not.

@CarolineXGao
Copy link

YAML is really useful!! Is it possible to add it on ?

@daattali
Copy link
Collaborator

daattali commented May 21, 2019 via email

@psychelzh
Copy link

psychelzh commented Nov 16, 2020

Thanks for this package. Current workaround (or even a better solution) is to add this line to your setup chunk of "Rmd" file:

knitr::opts_knit$set(root.dir = here::here())

This will allow you to handle the working directory issue by using knitr package only. Because here::here() will find where your R project is and root.dir option will set that as your working directory.

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

5 participants