我正在为我的项目使用 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
}
这些数据不是实际数据,只是示例数据。
是否可以在单独的屏幕或浏览器窗口中显示“仅”输出?无需显示任何图形或绘图操作。