R输出看起来像文本表

时间:2019-01-04 14:46:18

标签: r formatting

我想创建一个看起来像文本表的R输出。

我的数据框是这样的:

  header1 header2                         header3
1  abcdef   horse today is going to be a good day
2     123    ball    yesterday was not a good day

但是,我希望输出看起来像这样:

+---------+---------+-------------------------+
| header1 | header2 |         header3         |
+---------+-----------------------------------+
|abcdef   |horse    |today is a great day     |
+---------+---------+-------------------------+
|123      |ball     |tomorrow is a greater day|
+---------+---------+-------------------------+

我觉得有一个函数可以做到这一点,但是我找不到它。感谢您的提前帮助!

0 个答案:

没有答案