以编程方式调整RStudio控制台宽度 [英] Adjust RStudio console width programmatically

查看:68
本文介绍了以编程方式调整RStudio控制台宽度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用tibble的 glimpse 函数,该函数将输出调整为RStudio控制台宽度的输出.为了获得最具描述性的输出,我希望RStudio的控制台宽度较大(大约为180).

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).

如何使用代码而不是手动设置宽度? getOption("width") options("width")[[1]] 返回宽度,但是由于出现错误,我无法将其设置为一个值.

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.

我什至尝试使用 options("width" = 180)设置宽度.此步骤虽然可以编辑width参数,但不会扩展RStudio的控制台.

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

推荐答案

要更改 width选项,请使用

options(width = 180) 

这篇关于以编程方式调整RStudio控制台宽度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆