Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

separate screen for output in R?

Tags:

r

rstudio

sink

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.

like image 780
varun cyriac Avatar asked Jan 18 '14 07:01

varun cyriac


1 Answers

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

like image 185
Thomas Avatar answered Oct 02 '22 02:10

Thomas