问题
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.
回答1:
To change the width option
, use
options(width = 180)
来源:https://stackoverflow.com/questions/53895325/adjust-rstudio-console-width-programmatically