From dna_jin at hotmail.com  Wed Jun  4 16:18:37 2008
From: dna_jin at hotmail.com (Rongrong)
Date: Wed, 4 Jun 2008 07:18:37 -0700 (PDT)
Subject: [Rd]  An issue happens Embed R and redirt png file
Message-ID: <17647871.post@talk.nabble.com>


I am a new R user and I have a question of embedding R to generate png
On Debian, I installed R by source code.

Now I want to embed R in an application which name is MyApp, and run
the following syntax:
png(filename="/tmp/Rplot%03d.png)
example(rect)
dev.off()
 
Unfortunately I get the following error message:

Error in X11(paste("png::", filename, sep = ""), width, height, pointsize, 
: 
  unable to start device PNG 
Calls: png 
In addition: Warning message: 
In png(filename = "/tmp/test%03d.png") : 
  unable to open connection to X11 display ''

But I could run above syntax from R, and the result is correct, I can get
two png files from /tmp/ folder.
  
I try to respectively run same syntax(the syntax is:
capabilities()[["png"]])
under two modes, the result is different:
In R the result is TRUE, but when MyApp embed R the result is FALSE

Then I used bitmap(file="/tmp/test") when embed R in MyApp, but get another
error message:

Error in bitmap(file = "/tmp/test") : sorry, 'gs' cannot be found

Besides, I have installed xvfb. What I need do?

Thanks
-- 
View this message in context: http://www.nabble.com/An-issue-happens-Embed-R-and-redirt-png-file-tp17647871p17647871.html
Sent from the R devel mailing list archive at Nabble.com.



[Rd] An issue happens Embed R and redirt png file
Rongrong