我正在为我的项目使用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)
这些数据不是实际数据,只是示例数据.
是否可以在单独的屏幕或浏览器窗口中"仅显示"输出?无需显示任何图形或绘图操作.
我有一个数据data.frame格式我希望将其转换为transactions或itemMatrix.
检查功能arules支持这两种数据格式,这就是我问这个问题的原因