문제

I am using RStudio for my project, I want a separate screen for the output. I tried with sink(), but I need a new pop up window. My code is

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
}

These data is not the actual one, just example data.

Is it possible to show the output "ONLY" in a separate screen or browser window? no need to show any graph or plot operation.

도움이 되었습니까?

해결책

Per my comment, here's an example using the sinkstart function from rite.

Code:

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

Here's a screenshot:

enter image description here

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top