[TxMt] Re: R bundle not refreshing plot(s)
Berend Hasselman
bhh at xs4all.nl
Sat Sep 3 12:24:32 UTC 2011
On 03-09-2011, at 14:11, Hans-Jörg Bibiko wrote:
>
> On 3 Sep 2011, at 12:55, Berend Hasselman wrote:
>> On 02-09-2011, at 21:23, Berend Hasselman wrote:
>>> I am running the following R code in TextMate
>>>
>>> sessionInfo()
>>> x <- 1:20
>>> y <- 2*x+runif(length(x), min=-2, max=2)
>>>
>>> mean(y)
>>>
>>> plot(x,y)
>>>
>>>
>>> on Mac OS X 10.6.8 with R2.13.1 in TextMate 1.5.10 (1631) and the R.tmbundle.
>>>
>>> The plot is not being refreshed every time I run the file with Command R (leaving the html window open).
>>>
>>> When I close the output html window before doing Command R the plot does refresh.
>
>> I believe the problem is caused by a recent update of WebKit, possibly the one coming with Safari 5.1
>> I have (at least for now) been able to construct a workaround.
>
>
> Hi Berend,
>
> thanks for pointing out the problem. I've just fixed it. I went another way to enforce the reloading.
>
> rndn = Time.now.to_i # random number needed to enforce reloading of cached images
>
> print "<img width=#{width} onclick=\"TextMate.system(\'open \\'#{f}\\'\',null);\" src='file://#{f}?#{rndn}' />"
>
>
> This approach avoids the generating of lots of files while having a R session.
tmR.rb is deleting everything in the temporary directory, isn't it?
Your solution is nicer since no weird strings are inserted in the filenames.
When can I use svn to update the bundle?
Thanks very much for the fix. Much appreciated, since I use the R bundle in TextMate so often.
Berend
More information about the textmate
mailing list