Ash Reddy
Ash Reddy

Reputation: 1042

Adjust RStudio console width programmatically

I'm using tibble's glimpse function that prints output adjusted to RStudio's console width. To get the most descriptive output, I want RStudio's console width to be large (something like 180).

How do I set the width using code and not manually? getOption("width") or options("width")[[1]] returns the width, but I cannot set it to a value as that throws an error.

Edit: I've even tried setting width using options("width" = 180). This step although edits width parameter but does not expand RStudio's console.

Upvotes: 2

Views: 1998

Answers (1)

Jozef
Jozef

Reputation: 2737

To change the width option, use

options(width = 180) 

Upvotes: 2

Related Questions