防止 [R] 长行数据帧被截断?

时间:2020-12-31 19:19:20

标签: r dataframe printing output

我有宽行的数据框,要么是因为它们有很多数值列,要么是因为它们有很长的文本列

我通常使用 RStudio 和 Rmd Notebooks。我不知道如何在不截断的情况下打印整行。当我在 RStudio 控制台中运行代码时,我得到了相同的行为,所以我认为这不是 R 降价问题。

我还想使用 capture.out() 来保存 anova 等函数的格式化输出。 capture.out() 文件也被截断了

这是来自 RStudio 控制台的示例

> fdf <- mcols(res.lfcShrink)
> fdf
DataFrame with 4 rows and 2 columns
                       type            description
                <character>            <character>
baseMean       intermediate mean of normalized c..
log2FoldChange      results log2 fold change (MA..
lfcSE               results posterior SD: diseas..
svalue              results FSOS s-value (T=1): ..

> mcols(res.lfcShrink)$description
[1] "mean of normalized counts for all samples"           
[2] "log2 fold change (MAP): diseaseState PDAC vs healthy"
[3] "posterior SD: diseaseState PDAC vs healthy"          
[4] "FSOS s-value (T=1): diseaseState PDAC vs healthy"    

我尝试将“控制台中显示的行数限制为”500。没有帮助

提前致谢

安迪

0 个答案:

没有答案