我如何使用R编程将文本文件转换为:(冒号)分隔的CSV文件

时间:2018-08-16 08:00:54

标签: r

我的文本文件中包含以下数据:

class loaders:                                                    4
  identified class loaders:                                         4
  - auto-identified:                                              2
  generated class loaders:                                          2
  classes:                                                       3032
  generated classes:                                               87
  speculative class loads:                                       2631:   2631
  speculative class initializations:                             1401:   1401
  - forced:                                                      23
  matched class loads:                                           2636
  unmatched class loads:                                           96
  fully developed hierarchies:                                   2636
  over-developed hierarchies:                                       2
  initialized classes:                                           2581
  methods:                                                       4440
  tier1 compilable methods:                                      3658:   3658:   3658
  - precompiled:                                               3658:   3658:   3658
  - pre-main triggered:                                        3658
  - failed installs:                                              4
  - w/ generated dependencies:                                    0
  - w/ dependencies that cannot be pre-loaded:                    0
  - w/ dependencies that cannot be pre-initialized:               0
  tier2 compilable methods:                                      1496:   1496:   1496
  - precompiled:                                               1496:   1496:   1496
  - pre-main triggered:                                        1479
  - buffered compiles:                                         1706
  - failed installs:                                              0
  - w/ generated dependencies:                                    0
  - w/ dependencies that cannot be pre-loaded:                    0
  - w/ dependencies that cannot be pre-initialized:               0
  profiled methods:                                              2498:   2510

它大约包含31行。 因此,我希望输出如下: 每行中每个单词的不同列,以冒号(:)作为分隔符。

所以,我需要输出正好是31行,但要采用表格格式(例如csv)

0 个答案:

没有答案