what's a prettier way to print info with R?

后端 未结 3 1287
慢半拍i
慢半拍i 2020-12-19 06:27

In R, I use the print function for output but I always get an ugly output. If I do:

print(\"hello world\")

the output is:

[         


        
相关标签:
3条回答
  • 2020-12-19 06:46

    Simply cat to print on stdout and message to print on stderr. sprintf (working exactly as in C) and paste are helpful when generating the output.

    0 讨论(0)
  • 2020-12-19 06:54

    Please read the fine manuals and discover cat(), sprintf(), ... and much much more.

    0 讨论(0)
  • writeLine is another option

    writeLines('Hello World')
    
    0 讨论(0)
提交回复
热议问题