You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm writing a Sweave document and when knitting my document, my anonymous functions are turned into bigger anonymous functions; for example:
<<>>=(\(x) x^2)(4)@
Turns into
(function(x){x^2})(4)
In the output. My issue is that I'm doing a bunch of these, and it's occupying a lot of space in my output, which I didn't wish it did.
Explicitly,
Turns into
I know this is because of tidy=TRUE and formatR, but I did not find any parameter that changes this behaviors. Adding the option tidy=FALSE resolves the issue, but I think this is not intended, so I'm writing an issue about it.
Interestingly, not putting the brackets produces a code that should not run, since the function requires brackets to run afaik.
I have provided the necessary information about my issue.
If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('formatR'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('yihui/formatR').
If I have posted the same issue elsewhere, I have also mentioned it in this issue.
I have learned the Github Markdown syntax, and formatted my issue correctly.
I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered:
I'm writing a Sweave document and when knitting my document, my anonymous functions are turned into bigger anonymous functions; for example:
Turns into
In the output. My issue is that I'm doing a bunch of these, and it's occupying a lot of space in my output, which I didn't wish it did.
Explicitly,
Turns into
I know this is because of
tidy=TRUE
andformatR
, but I did not find any parameter that changes this behaviors. Adding the optiontidy=FALSE
resolves the issue, but I think this is not intended, so I'm writing an issue about it.Interestingly, not putting the brackets produces a code that should not run, since the
function
requires brackets to run afaik.By filing an issue to this repo, I promise that
xfun::session_info('formatR')
. I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version:remotes::install_github('yihui/formatR')
.I understand that my issue may be closed if I don't fulfill my promises.
The text was updated successfully, but these errors were encountered: