Home Comments Thread
New Thread

6 Comments

giscus-bot giscus-bot 2022-12-17 01:25:44
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?

yihui yihui 2022-12-17 01:25:48

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

giscus-bot giscus-bot 2022-12-17 01:25:45
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!

yihui yihui 2022-12-17 01:25:49

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

giscus-bot giscus-bot 2022-12-17 01:25:50
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.

giscus-bot giscus-bot 2022-12-17 01:25:46
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

yihui yihui 2022-12-22 16:07:42

FYI !! is supported now.

giscus-bot giscus-bot 2022-12-17 01:25:47
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!

yihui yihui 2022-12-17 01:25:51

Try to increase the scipen option before the chunk, e.g., options(scipen = 10).

Originally posted on 2018-03-27 18:06:40

giscus-bot giscus-bot 2022-12-17 01:25:52
Guest *Julia de Romémont* @ 2018-03-27 19:07:39 originally posted:

Perfect, thank you!

giscus-bot giscus-bot 2022-12-17 01:25:47
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()?

giscus-bot giscus-bot 2022-12-19 05:09:15
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)]

yihui yihui 2022-12-19 05:10:31

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

giscus-bot giscus-bot 2022-12-19 05:10:53
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.

yihui yihui 2022-12-22 16:18:05

:= is supported now: yihui/formatR@6148578

Sign in to join the discussion

Sign in with GitHub