Print pretty data.frames/tables to console

前端 未结 5 1004

Is there a way to print small data.frames to the console in a more readable manner?

For example, would it be possible to output to the console:

5条回答
  •  忘掉有多难
    2020-12-03 01:37

    If you are also open to printing your output into the (RStudio) viewer pane rather than the console, I would recommend using the DT package.

    library(DT)
    datatable(iris)
    

    This has several advantages, I think: the output is pretty and well-arranged, the package is able to display large data frames without becoming cumbersome and it is highly customizable to boot.

提交回复
热议问题