检查默认输出是否到达R中的终端
如何检查输出是否到达R中的端子 我找到了检查默认输出是否到达R中的终端,r,terminal,tty,R,Terminal,Tty,如何检查输出是否到达R中的端子 我找到了file.info(),但就文件类型而言,它似乎只支持 isdir: logical: Is the file a directory? 而且它似乎不支持像stdout()或stderr()这样的参数,您可以在R连接上使用isatty(),就像在libc文件描述符上使用它一样: R> isatty(stdout()) [1] TRUE
file.info()
,但就文件类型而言,它似乎只支持
isdir: logical: Is the file a directory?
而且它似乎不支持像stdout()
或stderr()
这样的参数,您可以在R连接上使用isatty()
,就像在libc
文件描述符上使用它一样:
R> isatty(stdout())
[1] TRUE