在R中输出单独的屏幕?

var*_*iac 7 r rstudio sink

我正在为我的项目使用RStudio,我想要一个单独的输出屏幕.我尝试过sink(),但我需要一个新的弹出窗口.我的代码是

vd<-data.frame()
vd<-c("V1","V2")
vf<-length(vd)
i<-1
while(i<=vf){
vd<-c("V1","V2")
#print(vd)
leng<-length(vd)
selectru<-combn(vd,leng)
#print(selectru)
print(selectru[i])
fst<-selectru[i]
select<-data.frame()
select<-selectru[selectru[,1]!=selectru[i],]
m<-length(select)
select<-combn(select,m)
snd <-apply(select,2,function(rows) paste0(rows, collapse = ""))
cat(sprintf("\"%s\" =>\"%s\"\n", fst,snd))
i<-i+1
}
Run Code Online (Sandbox Code Playgroud)

这些数据不是实际数据,只是示例数据.

是否可以在单独的屏幕或浏览器窗口中"仅显示"输出?无需显示任何图形或绘图操作.

Tho*_*mas 6

根据我的评论,这是一个使用ritesinkstart函数的例子.

码:

library(rite)
sinkstart(echo=FALSE)
# your code
# close the widget with the X or
# use `sinkstop()` to turn off the `sink`ing
Run Code Online (Sandbox Code Playgroud)

这是一个截图:

在此输入图像描述