Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/unix/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
检查默认输出是否到达R中的终端_R_Terminal_Tty - Fatal编程技术网

检查默认输出是否到达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

如何检查输出是否到达R中的端子

我找到了
file.info()
,但就文件类型而言,它似乎只支持

isdir: logical: Is the file a directory?
而且它似乎不支持像
stdout()
stderr()
这样的参数,您可以在R
连接上使用
isatty()
,就像在
libc
文件描述符上使用它一样:

R> isatty(stdout())
[1] TRUE