-
-
Notifications
You must be signed in to change notification settings - Fork 878
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
knitr::purl fail with parametrized Rmd when params is used in chunk option #1938
Comments
That's it. |
Then we can say it is a feature request to be able to "purl" Rmd file, even when using parameters ? It could also be another tool than knitr, as parsing code chunks and inline code from a Rmd chunk is something that seem to be often needed. For now, I think every usage like that uses |
In principle, |
I'm okay with supporting this case. I have already had some code supporting the special case of R Markdown in knitr. Parsing YAML doesn't involve "evaluating" code, so that's probably fine. In fact, Lines 235 to 238 in 0272a83
The deeper problem is that I have never been satisfied with |
Yes, there is a need. The problem is that it is not possible to both statically and faithfully extract code in certain cases. The |
…1.7.0 Indrajeet Patil (1): update GHA Lorenz (62): switch to latest pre-commit.ci avoid pre-commit checks fix pre-commit issues more ignore emergency release to comply with CRAN policy drop unused option delete outdated documentation drop unnecessary conditions update NEWS update cran comments fix version in NEWS.md make this the devel version eof various fixes use latest {precommit} version ignore alignment vignette styler no invalid files purl can't work when header has outside dependencies (yihui/knitr#1938) more exclusion more exclusion re-roxygenize styler add news exclude more bump version autoupdate try newever pre-commit version also fix out file use latest hooks add vignette also recognize lintr ignore markers stylerignore should be respected fr alignemnt detection add blog post on quick customization as vignette, Edis proposed by Maelle for main vignette rename bump bump see if serialization is problem bump bump bump bump bump bump bump bump bump bump bump2 bump3 try without serial fix refs add ability to set cache root within R.cache suggest cache name fix reference issues add messages upate main add news Don't allow multiple since regex is already enough flexible bump bump link GitHub template Lorenz Walthert (127): file.remove does not work on Windows for directories. should not make a difference but not worse... Update R/utils-cache.R add dot improve (I think) Add news reverse order update pre-commit bump to 3.4 and remove backports remove < 3.4 related problem use drop-in replacement for xfun::read_utf8() complete / improve on #853 remove xfun dep use touchstone bleeding edge bump Revert "use touchstone bleeding edge" make no trailing line a pre-processing step like trimming whitespaces styled text has no trailing, input also not (since last commit) bump use boostrap 5 use touchstone after api change news fix issue remove helper from index don't opt in to boostrap 5 add pre-commit via GHA also run on main add style problem also on master and main push bump only push conditional on master add style problem restore initial move pipe adder one level up so we have the context of the enclosing call and can check if it's substitute or not. remove trees ignore more for built re-arrange news quoted key does not mean aligned per se reject styling wrongly parsed coder add more concise advice fix error preserve trailing blank line fix invalid braces Update NEWS.md internal api should handle empty strings more grateful, yet not 100% consistent latest pre-commit add a test fix pre-commit always use keyword invalid for unparsable more renaming add new hooks re-order sort Rbuildignore add more examples re-order Only one concurrent build from each group test if in-flight is cancelled also switch for touchstone empty action only set within jobs probably bump more generic bump fix concurrency document must have python 3.9 creating tokens must respect stylerignore more cases and tests fix old R version needs explicit 0 don't eval vignette remove indent again Revert "don't eval vignette" fix and test .onLoad() fix test stronger guarantees for output "\01" does not really exist dont subset with [[1]], since comments will return empty expression Update NEWS.md use touchstone action use touchstone GitHub Action upgrade R fix json newer binaries use action from main slight test relax replace action with template add concurency test PR #99 don't double count the comma between column and the previous column prepare news switch back to main after #99 was merged. tilde is flattened out and causes indention like other operators somehow simplify and extend switch back to main after #99 was merged. bump bump update actions add concurrency for pkgdown also move concurrency down fix failing build style within functioncall, `token_after` is a nest and not a terminal -> `token_after` is `NA` set styler cache {glue} should not be a runtime CRAN dependency, it's only used in {touchstone} script, which is in .Rbuildignore and {touchstone} already covers {glue} (https://github.com/lorenzwalthert/touchstone/blob/main/actions/receive/action.yaml#L49). Update NEWS.md proper version comparision with string add new integrations pass down indent_by more updates more updates allow for arbitrary indention characters relax speed bound autoupdate pre-commit try newer release for parsing and deps fix error typo test ignore markers test on problematic file eq sub: Update NEWS.md don't check specific error message prepare release note on dependencies add all contributors fix urls must mask all non-base packages require higher cli to avoid backwards incompatibility with https://github.com/r-lib/styler/pull/894/files Maëlle Salmon (1): Add another "hacking" tip bersbersbers (1): Fix incorrect option name file_type (close #854) github-actions[bot] (4): pre-commit pre-commit pre-commit pre-commit pre-commit-ci[bot] (2): [pre-commit.ci] pre-commit autoupdate [pre-commit.ci] auto fixes from pre-commit.com hooks
From ropensci/targets#256
When
tangle = TRUE
and Rmd uses parameters, it works ok if params are used in code chunks but it fails if params is used in one of the chunk option.It seems like a bug.
Also, it seems knitr is not aware about parameters defined in a Rmd file when knitting. But this may be unsupported as parametrized report is a rmarkdown feature mainly
The text was updated successfully, but these errors were encountered: