6 Comments
Guest *Cogitoxin* @ 2017-07-11 20:33:05 originally posted:
Thanks for developing this great tool! But I'm getting the following error:
91: df_ <- sample %>%
92: filter ( sample >= 10 ) %>% %InLiNe_IdEnTiFiEr%
when inline comments are mixed with %>%
Any solution?
Did you really read this page? If you are busy, it is documented in Section 6.
Originally posted on 2017-07-12 21:28:48
Guest *Benjamin Elijah* @ 2017-07-28 01:46:00 originally posted:
Can you make this an addin? That would be awesome! Thanks Yihui. Thanks for giving back!
JJ has made it, although it was an example to show how to make an RStudio addin :) https://rstudio.github.io/rstudioaddins/
Originally posted on 2017-07-28 03:07:58
Guest *Álvaro Brey* @ 2017-11-03 11:02:24 originally posted:
I've made a simpler one without a separate UI, which just reformats the current file: https://github.com/ontherunvaro/formatFileAddin.
Guest *Sebastian Zeki* @ 2017-11-01 11:16:10 originally posted:
Hi Great package. I have noticed with non-standard evaluation in dplyr, code like:
x %>% arrange(!!AColumn, !!Bcolumn) is converted to
x %>% arrange(!(!AColumn), !(!Bcolumn)) so that the function this is a part of doesnt work. Its simple enough to fix after the package is un but might be worth considering to update this in the package
FYI !! is supported now.
Guest *Julia de Romémont* @ 2018-03-27 17:28:43 originally posted:
Very nice package!! I am using tidy=TRUE in Rmarkdown and just have a very niche problem in that a large number (100000) gets automatically changed to 1e+05. Do you know how this could be avoided? Thanks very much for for your help!
Try to increase the scipen option before the chunk, e.g., options(scipen = 10).
Originally posted on 2018-03-27 18:06:40
Guest *Julia de Romémont* @ 2018-03-27 19:07:39 originally posted:
Perfect, thank you!
Guest *Vee* @ 2018-08-20 11:07:24 originally posted:
Hi Yihui,
I want to format my codes in chunks and remove overflowing code, tried opts_chunk$set(tidy.opts=list(width.cutoff=60),tidy = TRUE) but it does not work. How do I use tidy_source()?
Guest *Peng Wang* @ 2019-08-23 19:17:31 originally posted:
Thanks for the tool. Is it possible to revert data.table := syntax back instead of the function invocation?
a[, b:=1] right now is formatted as a[, `:=`(b, 1)]
That is not possible, because it is how R's deparse() works:
> deparse(parse(text = 'b:=1')[1])
[1] "expression(`:=`(b, 1))"Originally posted on 2019-08-23 19:58:37
Guest *Peng Wang* @ 2019-08-24 00:12:58 originally posted:
That's what I guess.
I could think of some dirty/risky workaround like post parsing that part use a simple syntax tree. Might work, but could bring something unexpected.
:= is supported now: yihui/formatR@6148578
Sign in to join the discussion
Sign in with GitHub