Output issues with RStudio 1.1.453

I am running RStudio 1.1.453 on a macOS 10.13.5 machine with R version 3.5.1. Since The 3.5 release, I've had issues with output in my RStudio console. It occurs when there is a lot of output from particular packages, like blogdown when you are using serve_site() or devtools::check(). Here is an example of what some output from devtools::test() looks like:

══ e[1mResultse[22m ════════════════════════════════════════════════════════════════════════════════════════════════════════════
e[36mDuration: 0.4 se[39m

OK:       e[32m12e[39m
Failed:   e[31m2e[39m
Warnings: e[32m0e[39m
Skipped:  e[32m0e[39m

e[31mDon't worry, you'll get it.e[39m

If I open up R instead of RStudio, I get the expected output:

══ Results ════════════════════════════════════════════════════════════════════
Duration: 0.2 s

OK:       12
Failed:   2
Warnings: 0
Skipped:  0

Don't worry, you'll get it.

I've tried googling to no avail. I have an iMac that has identical versions of R and RStudio but is running macOS 10.12.6 that does not produce this behavior. Any help resolving this bug would be very appreciated! I had hope it would resolve with R 3.5.1 but alas...

Not that it resolves the issue, but these are ANSI escape codes used for defining a color in the terminal. And I guess it's not escaping on your system for some reason.

Since you say it works fine with R, perhaps uninstall and reinstall rstudio?

1 Like

Thanks @EconomiCurtis - I'm traveling right now but will find some time to give this a shot. I've upgraded RStudio since this error first cropped up, so I would think this would have helped, but will try again!

Hi @EconomiCurtis - no dice - I re-installed RStudio but the escape codes remain. Thanks for the suggestion!

Finally got back to this because I've been doing some package development again and the overwhelming amount of escape codes are making it hard to check unit tests...

I reinstalled RStudio and also upgraded to 1.1.456 but the issue has persisted. I also think I've found one additional piece of evidence:

> rstudioapi::hasColorConsole()
[1] FALSE

Anyone (@EconomiCurtis or others) have any suggestions?

RStudio 1.1 does support ANSI color codes in the console.

What is your setting under Tools / Global Options / Code / Display, for ANSI Escape Codes?

2018-08-30_16-35-53

2 Likes

Not sure how but this was set to Ignore ANSI codes (1.0 behavior) - I had no idea that setting was there! Thanks for the tip @GaryR - output from devtools::test() is legible again! Really struggled with this in part because I had no idea what to google based on what I was seeing in the console (the e[32m12e syntax).

1 Like