-
Notifications
You must be signed in to change notification settings - Fork 71
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
Ignore {knitr} chunks that use Rcpp
engine?
#928
Comments
Thanks. The quick fix I beliebe is just not to use
However, to solve this more generically, we should probably rely on {knitr} to parse the code chunk header. This would also allow for #839, since we'd have keys and values we can easily format. Since we already import {knitr} in |
{knitr}
chunks that use Rcpp
engine?Rcpp
engine?
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
The parameters from chunk header are parsed using an internal function called knitr:::parse_params("a=1, engine='Rcpp'")
#> $a
#> [1] 1
#>
#> $engine
#> [1] "Rcpp"
#>
#> $label
#> [1] "unnamed-chunk-3"
knitr:::parse_params("Rcpp, foo, a=1,")
#> $label
#> [1] "Rcpp, foo"
#>
#> $a
#> [1] 1 Created on 2022-03-10 by the reprex package (v2.0.1.9000) |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Here's all we need to know going forward: yihui/knitr#2112 |
I also get the e-mails btw
…On Thu, Mar 10, 2022 at 3:18 PM Lorenz Walthert ***@***.***> wrote:
Thanks, I'll file an issue in {knitr} and ask about exporting this
function. Really strange these emails you get...
—
Reply to this email directly, view it on GitHub
<#928 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB2BA5PRWRYZW4VVD3WLST3U7J7KVANCNFSM5QHJ5M2Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@MichaelChirico Do you still get emails when you comment? This should have been resolved in #1008. |
testing... |
In a way, a follow-up to #312.
Should {styler} ignore {knitr} R code chunk with
Rcpp
engine?For example, if I try to style an
.Rmd
file containing the following chunk,it will (understandably) produce the following error:
But this file might also contain a number of other R code chunks with
engine = 'R'
, and none of them will be styled due to the offendingRcpp
engine chunk.The text was updated successfully, but these errors were encountered: