Hi,
while sitting on the entire R stuff I had an idea concerning Rmate.
If Rmate plots something it will save these images (PDFs) in a temporary folder, and at the end it will open these files in Preview. Fine. My suggestion is, instead of open Preview automatically to display all images inside of the Rmate output window as pdfs right after the last output. If one clicks on an image it opens it with the default application, or one can drag it to a location to save it as pdf.
As demo I did a screencast 9MB http://www.bibiko.de/TMRmate.mov
Would this be useful?
Best,
--Hans
I think that's a great idea!
Only thing I would suggest, is that the images show up in the Rmate output window scaled to a predetermined, much smaller, height, so that they show up as thumbnails. Would that be easy to do? How does this treat lattice plots?
On Jan 4, 2008, at 12:57 PM, Hans-Jörg Bibiko wrote:
Hi,
while sitting on the entire R stuff I had an idea concerning Rmate.
If Rmate plots something it will save these images (PDFs) in a temporary folder, and at the end it will open these files in Preview. Fine. My suggestion is, instead of open Preview automatically to display all images inside of the Rmate output window as pdfs right after the last output. If one clicks on an image it opens it with the default application, or one can drag it to a location to save it as pdf.
As demo I did a screencast 9MB http://www.bibiko.de/TMRmate.mov
Would this be useful?
Best,
--Hans
Haris Skiadas Department of Mathematics and Computer Science Hanover College
On 04.01.2008, at 23:49, Charilaos Skiadas wrote:
I think that's a great idea!
Only thing I would suggest, is that the images show up in the Rmate output window scaled to a predetermined, much smaller, height, so that they show up as thumbnails. Would that be easy to do?
It's very easy – only pre-set the HTML width parameter in tmR.rb, but one cannot change the size on-the-fly using JavaScript I believe.
How does this treat lattice plots?
I took an example from the xyplot help file and set the plot images' width to 200:
library(lattice) require(stats) Depth <- equal.count(quakes$depth, number=8, overlap=.1) xyplot(lat ~ long | Depth, data = quakes) update(trellis.last.object(), strip = strip.custom(strip.names = TRUE, strip.levels = TRUE), par.strip.text = list(cex = 0.75), aspect = "iso") EE <- equal.count(ethanol$E, number=9, overlap=1/4) ## Constructing panel functions on the fly; prepanel xyplot(NOx ~ C | EE, data = ethanol, prepanel = function(x, y) prepanel.loess(x, y, span = 1), xlab = "Compression Ratio", ylab = "NOx (micrograms/J)", panel = function(x, y) { panel.grid(h=-1, v= 2) panel.xyplot(x, y) panel.loess(x,y, span=1) }, aspect = "xy") ## with and without banking plot <- xyplot(sunspot.year ~ 1700:1988, xlab = "", type = "l", scales = list(x = list(alternating = 2)), main = "Yearly Sunspots") print(plot, position = c(0, .3, 1, .9), more = TRUE) print(update(plot, aspect = "xy", main = "", xlab = "Year"), position = c(0, 0, 1, .3))
and I got this ;)
On 05.01.2008, at 01:11, Hans-Jörg Bibiko wrote:
On 04.01.2008, at 23:49, Charilaos Skiadas wrote:
I think that's a great idea!
Only thing I would suggest, is that the images show up in the Rmate output window scaled to a predetermined, much smaller, height, so that they show up as thumbnails. Would that be easy to do?
It's very easy – only pre-set the HTML width parameter in tmR.rb, but one cannot change the size on-the-fly using JavaScript I believe.
I did it in that way now: - if there's only one image the size is set to 100% = Rmate output window size - if there're more the size is set to 50%, i.e. two images in one row - if one resizes the Rmate output window the images will also be resized - a click at the image -> the image will be opened with the default app for pfds - drag the image to a location to save it as Rplot???.pdf - there're two buttons 'Open all images in Preview' and 'Reveal images in Finder'
Is that ok?
--Hans
On Jan 4, 2008 5:57 PM, Hans-Jörg Bibiko bibiko@eva.mpg.de wrote:
instead of open Preview automatically to display all images in the Rmate output folder,
should it be that the user needs to open or move the images?
i.e., http://www.bibiko.de/TMRmate.mov http://www.bibiko.de/TMRmate.mov --Hans
Dear Hans: Sounds fine: As a compromise, perhaps open the plot folder in the Finder.
PS: For me, start-> opens a start progress dialog that never returns, so I sadly can't test what looks like a neat new environment for R :-(
tim
On 04.01.2008, at 23:54, Timothy Bates wrote:
On Jan 4, 2008 5:57 PM, Hans-Jörg Bibiko bibiko@eva.mpg.de wrote: instead of open Preview automatically to display all images in the Rmate output folder, should it be that the user needs to open or move the images? i.e., http://www.bibiko.de/TMRmate.mov --Hans
Dear Hans: Sounds fine: As a compromise, perhaps open the plot folder in the Finder.
Maybe doable as button within the Rmate output window?
PS: For me, start-> opens a start progress dialog that never returns, so I sadly can't test what looks like a neat new environment for R :-(
Hmm. What R version do you are using? What version of Rdaemon do you are using? What Ruby version do you are using? Mac Tiger or Leopard? Did you changed the default prompt '> '?
If you see the start progress bar, click on a TM window and press APPLE+. to interrupt the current command. Open the Terminal and type:
ps -aw | grep TMRdaemon
Do you see something like this? 13016 p1 S+ 0:01.47 /Library/Frameworks/R.framework/Resources/ bin/exec/ppc/R --encoding=UTF-8 --TMRdaemon 2
Cheers,
--Hans