<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:www.nabble.com,2006:forum-13821</id>
	<title>Nabble - R devel</title>
	<updated>2008-07-24T20:10:35Z</updated>
	<link rel="self" type="application/atom+xml" href="http://www.nabble.com/R-devel-f13821.xml" />
	<link rel="alternate" type="text/html" href="http://www.nabble.com/R-devel-f13821.html" />
	<subtitle type="html">This list is intended for questions and discussion about code development in R. Questions likely to prompt discussion unintelligible to non-programmers or topics that are too technical for R-help's audience should go to R-devel.</subtitle>
	
<entry>
	<id>tag:www.nabble.com,2006:post-18644459</id>
	<title>serialize() to via temporary file is heaps faster than doing it directly (on Windows)</title>
	<published>2008-07-24T20:10:35Z</published>
	<updated>2008-07-24T20:10:35Z</updated>
	<author>
		<name>Henrik Bengtsson (max 7Mb)</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;&lt;br&gt;FYI, I just notice that on Windows (but not Linux) it is orders of
&lt;br&gt;magnitude (below it's 50x) faster to serialize() and object to a
&lt;br&gt;temporary file and then read it back, than to serialize to an object
&lt;br&gt;directly. &amp;nbsp;This has for instance impact on how fast digest::digest()
&lt;br&gt;can provide a checksum.
&lt;br&gt;&lt;br&gt;Example:
&lt;br&gt;x &amp;lt;- 1:1e7;
&lt;br&gt;t1 &amp;lt;- system.time(raw1 &amp;lt;- serialize(x, connection=NULL));
&lt;br&gt;print(t1);
&lt;br&gt;# &amp;nbsp; &amp;nbsp;user &amp;nbsp;system elapsed
&lt;br&gt;# &amp;nbsp; 174.23 &amp;nbsp;129.35 &amp;nbsp;304.70 &amp;nbsp;## 5 minutes
&lt;br&gt;t2 &amp;lt;- system.time(raw2 &amp;lt;- serialize2(x, connection=NULL));
&lt;br&gt;print(t2);
&lt;br&gt;# &amp;nbsp; &amp;nbsp; user &amp;nbsp;system elapsed
&lt;br&gt;# &amp;nbsp; &amp;nbsp; 2.19 &amp;nbsp; &amp;nbsp;0.18 &amp;nbsp; &amp;nbsp;5.72 &amp;nbsp; &amp;nbsp; &amp;nbsp;## 5 seconds
&lt;br&gt;print(t1/t2);
&lt;br&gt;# &amp;nbsp; &amp;nbsp; &amp;nbsp;user &amp;nbsp; &amp;nbsp;system &amp;nbsp; elapsed
&lt;br&gt;# &amp;nbsp; 79.55708 718.61111 &amp;nbsp;53.26923
&lt;br&gt;stopifnot(identical(raw1, raw2));
&lt;br&gt;&lt;br&gt;where serialize2() is serialize():ing to file and reading the results back:
&lt;br&gt;&lt;br&gt;serialize2 &amp;lt;- function(object, connection, ...) {
&lt;br&gt;&amp;nbsp; if (is.null(connection)) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; # It is faster to serialize to a temporary file and read it back
&lt;br&gt;&amp;nbsp; &amp;nbsp; pathname &amp;lt;- tempfile();
&lt;br&gt;&amp;nbsp; &amp;nbsp; con &amp;lt;- file(pathname, open=&amp;quot;wb&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; on.exit({
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (!is.null(con))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; close(con);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; if (file.exists(pathname))
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; file.remove(pathname);
&lt;br&gt;&amp;nbsp; &amp;nbsp; });
&lt;br&gt;&amp;nbsp; &amp;nbsp; base::serialize(object, connection=con, ...);
&lt;br&gt;&amp;nbsp; &amp;nbsp; close(con);
&lt;br&gt;&amp;nbsp; &amp;nbsp; con &amp;lt;- NULL;
&lt;br&gt;&amp;nbsp; &amp;nbsp; fileSize &amp;lt;- file.info(pathname)$size;
&lt;br&gt;&amp;nbsp; &amp;nbsp; readBin(pathname, what=&amp;quot;raw&amp;quot;, n=fileSize);
&lt;br&gt;&amp;nbsp; } else {
&lt;br&gt;&amp;nbsp; &amp;nbsp; base::serialize(object, connection=connection, ...);
&lt;br&gt;&amp;nbsp; }
&lt;br&gt;} # serialize2()
&lt;br&gt;&lt;br&gt;The above benchmarking was done in a fresh R v2.7.1 session on WinXP Pro:
&lt;br&gt;&lt;br&gt;&amp;gt; sessionInfo()
&lt;br&gt;R version 2.7.1 Patched (2008-06-27 r46012)
&lt;br&gt;i386-pc-mingw32
&lt;br&gt;&lt;br&gt;locale:
&lt;br&gt;LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MON
&lt;br&gt;ETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
&lt;br&gt;&lt;br&gt;attached base packages:
&lt;br&gt;[1] stats &amp;nbsp; &amp;nbsp; graphics &amp;nbsp;grDevices utils &amp;nbsp; &amp;nbsp; datasets &amp;nbsp;methods &amp;nbsp; base
&lt;br&gt;&lt;br&gt;&lt;br&gt;When I do the same on a Linux machine there is no difference:
&lt;br&gt;&lt;br&gt;&amp;gt; sessionInfo()
&lt;br&gt;R version 2.7.1 (2008-06-23)
&lt;br&gt;x86_64-unknown-linux-gnu
&lt;br&gt;&lt;br&gt;locale:
&lt;br&gt;LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_US.UTF-8;LC_IDENTIFICATION=C
&lt;br&gt;&lt;br&gt;attached base packages:
&lt;br&gt;[1] stats &amp;nbsp; &amp;nbsp; graphics &amp;nbsp;grDevices utils &amp;nbsp; &amp;nbsp; datasets &amp;nbsp;methods &amp;nbsp; base
&lt;br&gt;&lt;br&gt;Is there an obvious reason (and an obvious fix) for this?
&lt;br&gt;&lt;br&gt;Cheers
&lt;br&gt;&lt;br&gt;Henrik
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18644459&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/serialize%28%29-to-via-temporary-file-is-heaps-faster-than-doing-it-directly-%28on-Windows%29-tp18644459p18644459.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18633260</id>
	<title>How to loop through a set of data and to evaluate a function?</title>
	<published>2008-07-24T07:39:07Z</published>
	<updated>2008-07-24T07:39:07Z</updated>
	<author>
		<name>NicoNYC</name>
	</author>
	<content type="html">Hi,
&lt;br&gt;I will explain my problem :
&lt;br&gt;I would like to loop through a set of data taking the set 100 points at a time. &amp;nbsp;At each iteration I'd like to evaluate a function over this set. &amp;nbsp;In each subsequent iteration i add the next point to my sub set and remove the oldest and evaluate the function again (something like a moving window).
&lt;br&gt;&lt;br&gt;Small example : this is my data:
&lt;br&gt;1
&lt;br&gt;2
&lt;br&gt;3
&lt;br&gt;..
&lt;br&gt;10
&lt;br&gt;&lt;br&gt;with a moving window of 3 points, i would like to evaluate the following
&lt;br&gt;f(1,2,3)
&lt;br&gt;f(2,3,4)
&lt;br&gt;f(3.4.5)
&lt;br&gt;...
&lt;br&gt;f(8,9,10)
&lt;br&gt;&lt;br&gt;Thank you!</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/How-to-loop-through-a-set-of-data-and-to-evaluate-a-function--tp18633260p18633260.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18626979</id>
	<title>Re: plot.dendrogram xlim/ylim</title>
	<published>2008-07-24T00:49:39Z</published>
	<updated>2008-07-24T00:49:39Z</updated>
	<author>
		<name>Martin Maechler</name>
	</author>
	<content type="html">&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;quot;FA&amp;quot; == Felix Andrews &amp;lt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18626979&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;felix@...&lt;/a&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; on Thu, 24 Jul 2008 13:16:22 +1000 writes:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; FA&amp;gt; list(...), I would like to zoom in to the leaves of
&lt;br&gt;&amp;nbsp; &amp;nbsp; FA&amp;gt; large trees in a dendrogram plot. The playwith package
&lt;br&gt;&amp;nbsp; &amp;nbsp; FA&amp;gt; allows zooming by passing xlim and ylim arguments to the
&lt;br&gt;&amp;nbsp; &amp;nbsp; FA&amp;gt; plot call (Hmisc does this too I think). But currently
&lt;br&gt;&amp;nbsp; &amp;nbsp; FA&amp;gt; stats:::plot.dendrogram does not accept xlim or ylim. So
&lt;br&gt;&amp;nbsp; &amp;nbsp; FA&amp;gt; I would like to enable that. In place of the existing
&lt;br&gt;&amp;nbsp; &amp;nbsp; FA&amp;gt; code chunk:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; xlim &amp;lt;- c(x1 - 1/2, x2 + 1/2)
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ylim &amp;lt;- c(0, yTop)
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; if (horiz) {
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xl &amp;lt;- xlim
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xlim &amp;lt;- rev(ylim)
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ylim &amp;lt;- xl
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmp &amp;lt;- xaxt
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xaxt &amp;lt;- yaxt
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yaxt &amp;lt;- tmp
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; plot(0, xlim = xlim, ylim = ylim, ......
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; I propose something like:
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; function(..., xlim, ylim)
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; 
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; xlim0 &amp;lt;- c(x1 - 1/2, x2 + 1/2)
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; ylim0 &amp;lt;- c(0, yTop)
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; if (horiz) {
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xl &amp;lt;- xlim0
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xlim0 &amp;lt;- rev(ylim0)
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ylim &amp;lt;- xl
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmp &amp;lt;- xaxt
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xaxt &amp;lt;- yaxt
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yaxt &amp;lt;- tmp
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; if (missing(xlim)) xlim &amp;lt;- xlim0
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; if (missing(ylim)) ylim &amp;lt;- ylim0
&lt;br&gt;&amp;nbsp; &amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; plot(0, xlim = xlim, ylim = ylim, ......
&lt;br&gt;&lt;br&gt;Thank you for the suggestion!
&lt;br&gt;Yes, &amp;quot;something like&amp;quot; this will be part of R 2.8.0
&lt;br&gt;(or 'R-devel' as from tomorrow).
&lt;br&gt;&lt;br&gt;Martin Maechler, ETH Zurich
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;-- 
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;Felix Andrews / 安福立
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;PhD candidate
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;Integrated Catchment Assessment and Management Centre
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;The Fenner School of Environment and Society
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;The Australian National University (Building 48A), ACT 0200
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;Beijing Bag, Locked Bag 40, Kingston ACT 2604
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;&lt;a href=&quot;http://www.neurofractal.org/felix/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.neurofractal.org/felix/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;3358 543D AAC6 22C2 D336 80D9 360B 72DD 3E4C F5D8
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18626979&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/plot.dendrogram-xlim-ylim-tp18624761p18626979.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18626805</id>
	<title>Re: [R] shQuote and cat</title>
	<published>2008-07-24T00:38:25Z</published>
	<updated>2008-07-24T00:38:25Z</updated>
	<author>
		<name>Wacek Kusnierczyk</name>
	</author>
	<content type="html">Duncan Murdoch wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Vadim Organovich wrote:
&lt;br&gt;&amp;gt;&amp;gt; It is precizely a shell command that I am trying to generate. To be
&lt;br&gt;&amp;gt;&amp;gt; specific let's try to have R 'output' the following shell command:
&lt;br&gt;&amp;gt;&amp;gt; 'echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;'. This is is a valid command, at least in bash:
&lt;br&gt;&amp;gt;&amp;gt; bash-3.2$ echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Now in R:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; x &amp;lt;- 'echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; cat(x, '\n')
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; echo &amp;quot;&amp;quot;a&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; cat(shQuote(x), '\n')
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;echo \&amp;quot;\&amp;quot;a\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Whichever way you do it it is not right. Again I think cat('echo
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;') should be printing *echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;* (asterics are not a part
&lt;br&gt;&amp;gt;&amp;gt; of the output)
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;try this:
&lt;br&gt;&lt;br&gt;(x = 'echo &amp;quot;\\&amp;quot;a\\&amp;quot;&amp;quot;') # or x = 'echo \&amp;quot;\\\&amp;quot;a\\\&amp;quot;\&amp;quot;')
&lt;br&gt;[1] &amp;quot;echo \&amp;quot;\\\&amp;quot;a\\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&lt;br&gt;cat(x, &amp;quot;\n&amp;quot;)
&lt;br&gt;# echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;
&lt;br&gt;&lt;br&gt;as desired. &amp;nbsp;you need to backslash the backslash.
&lt;br&gt;&lt;br&gt;vQ
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18626805&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Re%3A--R--shQuote-and-cat-tp18618375p18626805.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18624761</id>
	<title>plot.dendrogram xlim/ylim</title>
	<published>2008-07-23T20:16:22Z</published>
	<updated>2008-07-23T20:16:22Z</updated>
	<author>
		<name>Felix Andrews</name>
	</author>
	<content type="html">list(...),
&lt;br&gt;&lt;br&gt;I would like to zoom in to the leaves of large trees in a dendrogram
&lt;br&gt;plot. The playwith package allows zooming by passing xlim and ylim
&lt;br&gt;arguments to the plot call (Hmisc does this too I think). But
&lt;br&gt;currently stats:::plot.dendrogram does not accept xlim or ylim. So I
&lt;br&gt;would like to enable that. In place of the existing code chunk:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; xlim &amp;lt;- c(x1 - 1/2, x2 + 1/2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; ylim &amp;lt;- c(0, yTop)
&lt;br&gt;&amp;nbsp; &amp;nbsp; if (horiz) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xl &amp;lt;- xlim
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xlim &amp;lt;- rev(ylim)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ylim &amp;lt;- xl
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmp &amp;lt;- xaxt
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xaxt &amp;lt;- yaxt
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yaxt &amp;lt;- tmp
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; plot(0, xlim = xlim, ylim = ylim, ......
&lt;br&gt;&lt;br&gt;I propose something like:
&lt;br&gt;&lt;br&gt;function(..., xlim, ylim)
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; xlim0 &amp;lt;- c(x1 - 1/2, x2 + 1/2)
&lt;br&gt;&amp;nbsp; &amp;nbsp; ylim0 &amp;lt;- c(0, yTop)
&lt;br&gt;&amp;nbsp; &amp;nbsp; if (horiz) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xl &amp;lt;- xlim0
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xlim0 &amp;lt;- rev(ylim0)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ylim &amp;lt;- xl
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; tmp &amp;lt;- xaxt
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; xaxt &amp;lt;- yaxt
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; yaxt &amp;lt;- tmp
&lt;br&gt;&amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; if (missing(xlim)) xlim &amp;lt;- xlim0
&lt;br&gt;&amp;nbsp; &amp;nbsp; if (missing(ylim)) ylim &amp;lt;- ylim0
&lt;br&gt;&amp;nbsp; &amp;nbsp; plot(0, xlim = xlim, ylim = ylim, ......
&lt;br&gt;&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;Felix
&lt;br&gt;&lt;br&gt;-- 
&lt;br&gt;Felix Andrews / 安福立
&lt;br&gt;PhD candidate
&lt;br&gt;Integrated Catchment Assessment and Management Centre
&lt;br&gt;The Fenner School of Environment and Society
&lt;br&gt;The Australian National University (Building 48A), ACT 0200
&lt;br&gt;Beijing Bag, Locked Bag 40, Kingston ACT 2604
&lt;br&gt;&lt;a href=&quot;http://www.neurofractal.org/felix/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.neurofractal.org/felix/&lt;/a&gt;&lt;br&gt;3358 543D AAC6 22C2 D336 80D9 360B 72DD 3E4C F5D8
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18624761&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/plot.dendrogram-xlim-ylim-tp18624761p18624761.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18623713</id>
	<title>Re: [R] shQuote and cat</title>
	<published>2008-07-23T18:08:58Z</published>
	<updated>2008-07-23T18:08:58Z</updated>
	<author>
		<name>Simon Urbanek</name>
	</author>
	<content type="html">&lt;br&gt;On Jul 23, 2008, at 4:46 PM, Vadim Organovich wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; It is precizely a shell command that I am trying to generate. To be &amp;nbsp;
&lt;br&gt;&amp;gt; specific let's try to have R 'output' the following shell command: &amp;nbsp;
&lt;br&gt;&amp;gt; 'echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;'. This is is a valid command, at least in bash:
&lt;br&gt;&amp;gt; bash-3.2$ echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt; &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Now in R:
&lt;br&gt;&amp;gt;&amp;gt; x &amp;lt;- 'echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;'
&lt;br&gt;&amp;gt;&amp;gt; cat(x, '\n')
&lt;br&gt;&amp;gt; echo &amp;quot;&amp;quot;a&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; cat(shQuote(x), '\n')
&lt;br&gt;&amp;gt; &amp;quot;echo \&amp;quot;\&amp;quot;a\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Whichever way you do it it is not right.
&lt;/div&gt;&lt;br&gt;Well, you input is not right ('\&amp;quot;' is parsed in R into '&amp;quot;') - you have &amp;nbsp;
&lt;br&gt;to escape the backslash that you want to keep and all is well:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; x &amp;lt;- 'echo &amp;quot;\\&amp;quot;a\\&amp;quot;&amp;quot;'
&lt;br&gt;&amp;nbsp;&amp;gt; cat(x, '\n')
&lt;br&gt;echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;
&lt;br&gt;&amp;nbsp;&amp;gt; cat(shQuote(x), '\n')
&lt;br&gt;'echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;'
&lt;br&gt;&amp;nbsp;&amp;gt; system(paste(&amp;quot;sh -c&amp;quot;,shQuote(x,type=&amp;quot;sh&amp;quot;)))
&lt;br&gt;&amp;quot;a&amp;quot;
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Simon
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Again I think cat('echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;') should be printing *echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;* &amp;nbsp;
&lt;br&gt;&amp;gt; (asterics are not a part of the output)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________________
&lt;br&gt;&amp;gt; From: Duncan Murdoch [&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18623713&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;murdoch@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; Sent: Wednesday, July 23, 2008 2:38 PM
&lt;br&gt;&amp;gt; To: Vadim Organovich
&lt;br&gt;&amp;gt; Cc: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18623713&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-devel@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [Rd] [R] shQuote and cat
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 7/23/2008 2:53 PM, Vadim Organovich wrote:
&lt;br&gt;&amp;gt;&amp;gt; I feel like it now belongs to r-devel more than to r-help.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; My output was garbled because I sent the original message as HTML, &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; sorry about that.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Your output, &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;, is what I get too. That is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; cat(shQuote(shQuote(shQuote(&amp;quot;a&amp;quot;))), '\n')
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; , which I think should be &amp;quot;\&amp;quot;\\\&amp;quot;a\\\&amp;quot;\&amp;quot;&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Actually, the R's output, &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;, is not even a valid string &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; literal, that is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; x &amp;lt;- &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; fails.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It's not intended to be a string literal in R, it's intended to be &amp;nbsp;
&lt;br&gt;&amp;gt; input
&lt;br&gt;&amp;gt; to the Windows CMD shell. &amp;nbsp;If you want a string literal in R, don't &amp;nbsp;
&lt;br&gt;&amp;gt; use
&lt;br&gt;&amp;gt; cat(). &amp;nbsp;cat() shows you the naked contents of the string without any
&lt;br&gt;&amp;gt; quoting to make it a valid string literal.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Now, by cat() being the inverse of shQuote() I mean printing the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; same literal as it goes into shQuote, quotes included:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; cat(shQuote(&amp;quot;a&amp;quot;), '\n')
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; whereas
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; cat(&amp;quot;a&amp;quot;, '\n')
&lt;br&gt;&amp;gt;&amp;gt; a &amp;nbsp;## no quotes
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If cat() is not the inverse of shQuote() in the above sense, what is?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Unix-like systems I think asking the shell to echo the output, i.e.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; system(paste(&amp;quot;echo&amp;quot;, shQuote(input)), intern=TRUE)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; is intended to reproduce the input. &amp;nbsp;However, the Windows CMD shell is
&lt;br&gt;&amp;gt; different. &amp;nbsp;I don't know how to strip quotes off a string in it, &amp;nbsp;
&lt;br&gt;&amp;gt; e.g. I see
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; C:\WINDOWS\system32 echo &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt; &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Nevertheless, the quotes *are* necessary when passing filenames to
&lt;br&gt;&amp;gt; commands, and they'll typically be stripped off when doing that, e.g.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; echo hi &amp;gt;&amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; will create a file named a, not named &amp;quot;a&amp;quot;, and
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; echo hi &amp;gt;&amp;quot;a b&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; will create a file with a space in the name.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Duncan Murdoch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Note: This email is for the confidential use of the named &amp;nbsp;
&lt;br&gt;&amp;gt; addressee(s) only and may contain proprietary, confidential or &amp;nbsp;
&lt;br&gt;&amp;gt; privileged information. If you are not the intended recipient, you &amp;nbsp;
&lt;br&gt;&amp;gt; are hereby notified that any review, dissemination or copying of &amp;nbsp;
&lt;br&gt;&amp;gt; this email is strictly prohibited, and to please notify the sender &amp;nbsp;
&lt;br&gt;&amp;gt; immediately and destroy this email and any attachments. &amp;nbsp;Email &amp;nbsp;
&lt;br&gt;&amp;gt; transmission cannot be guaranteed to be secure or error-free. &amp;nbsp;Jump &amp;nbsp;
&lt;br&gt;&amp;gt; Trading, therefore, does not make any guarantees as to the &amp;nbsp;
&lt;br&gt;&amp;gt; completeness or accuracy of this email or any attachments. &amp;nbsp;This &amp;nbsp;
&lt;br&gt;&amp;gt; email is for informational purposes only and does not constitute a &amp;nbsp;
&lt;br&gt;&amp;gt; recommendation, offer, request or solicitation of any kind to buy, &amp;nbsp;
&lt;br&gt;&amp;gt; sell, subscribe, redeem or perform any type of transaction of a &amp;nbsp;
&lt;br&gt;&amp;gt; financial product.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18623713&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18623713&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Re%3A--R--shQuote-and-cat-tp18618375p18623713.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18623148</id>
	<title>Re: [R] shQuote and cat</title>
	<published>2008-07-23T17:04:04Z</published>
	<updated>2008-07-23T17:04:04Z</updated>
	<author>
		<name>Duncan Murdoch-2</name>
	</author>
	<content type="html">Vadim Organovich wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; It is precizely a shell command that I am trying to generate. To be specific let's try to have R 'output' the following shell command: 'echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;'. This is is a valid command, at least in bash:
&lt;br&gt;&amp;gt; bash-3.2$ echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt; &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Now in R:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; x &amp;lt;- 'echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;'
&lt;br&gt;&amp;gt;&amp;gt; cat(x, '\n')
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; echo &amp;quot;&amp;quot;a&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; cat(shQuote(x), '\n')
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt; &amp;quot;echo \&amp;quot;\&amp;quot;a\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Whichever way you do it it is not right. Again I think cat('echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;') should be printing *echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;* (asterics are not a part of the output)
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;/div&gt;&lt;br&gt;But you were running on Windows, so the default shell is CMD, not bash. &amp;nbsp;
&lt;br&gt;shQuote doesn't support bash specifically, but I imagine it uses the 
&lt;br&gt;same quoting rules as sh, so you should use shQuote('&amp;quot;a&amp;quot;', type=&amp;quot;sh&amp;quot;). &amp;nbsp;
&lt;br&gt;On my machine that gives '&amp;quot;a&amp;quot;', and echo '&amp;quot;a&amp;quot;' prints &amp;quot;a&amp;quot; as you wanted.
&lt;br&gt;&lt;br&gt;I don't think you want to quote the &amp;quot;echo&amp;quot; in the command, only the 
&lt;br&gt;string that you want it to print, i.e. for the full command you should use
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; cat(paste(&amp;quot;echo&amp;quot;, shQuote('&amp;quot;a&amp;quot;', type=&amp;quot;sh&amp;quot;)))
&lt;br&gt;echo '&amp;quot;a&amp;quot;'
&lt;br&gt;&lt;br&gt;Duncan Murdoch
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; ________________________________________
&lt;br&gt;&amp;gt; From: Duncan Murdoch [&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18623148&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;murdoch@...&lt;/a&gt;]
&lt;br&gt;&amp;gt; Sent: Wednesday, July 23, 2008 2:38 PM
&lt;br&gt;&amp;gt; To: Vadim Organovich
&lt;br&gt;&amp;gt; Cc: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18623148&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-devel@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Subject: Re: [Rd] [R] shQuote and cat
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On 7/23/2008 2:53 PM, Vadim Organovich wrote:
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; I feel like it now belongs to r-devel more than to r-help.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; My output was garbled because I sent the original message as HTML, sorry about that.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Your output, &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;, is what I get too. That is
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp;&amp;gt; cat(shQuote(shQuote(shQuote(&amp;quot;a&amp;quot;))), '\n')
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; , which I think should be &amp;quot;\&amp;quot;\\\&amp;quot;a\\\&amp;quot;\&amp;quot;&amp;quot;.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Actually, the R's output, &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;, is not even a valid string literal, that is
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; x &amp;lt;- &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; fails.
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It's not intended to be a string literal in R, it's intended to be input
&lt;br&gt;&amp;gt; to the Windows CMD shell. &amp;nbsp;If you want a string literal in R, don't use
&lt;br&gt;&amp;gt; cat(). &amp;nbsp;cat() shows you the naked contents of the string without any
&lt;br&gt;&amp;gt; quoting to make it a valid string literal.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; Now, by cat() being the inverse of shQuote() I mean printing the same literal as it goes into shQuote, quotes included:
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; cat(shQuote(&amp;quot;a&amp;quot;), '\n')
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; whereas
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; cat(&amp;quot;a&amp;quot;, '\n')
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt; a &amp;nbsp;## no quotes
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If cat() is not the inverse of shQuote() in the above sense, what is?
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; On Unix-like systems I think asking the shell to echo the output, i.e.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; system(paste(&amp;quot;echo&amp;quot;, shQuote(input)), intern=TRUE)
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; is intended to reproduce the input. &amp;nbsp;However, the Windows CMD shell is
&lt;br&gt;&amp;gt; different. &amp;nbsp;I don't know how to strip quotes off a string in it, e.g. I see
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; C:\WINDOWS\system32 echo &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt; &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Nevertheless, the quotes *are* necessary when passing filenames to
&lt;br&gt;&amp;gt; commands, and they'll typically be stripped off when doing that, e.g.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; echo hi &amp;gt;&amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; will create a file named a, not named &amp;quot;a&amp;quot;, and
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; echo hi &amp;gt;&amp;quot;a b&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; will create a file with a space in the name.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Duncan Murdoch
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. &amp;nbsp;Email transmission cannot be guaranteed to be secure or error-free. &amp;nbsp;Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. &amp;nbsp;This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18623148&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18623148&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Re%3A--R--shQuote-and-cat-tp18618375p18623148.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18620603</id>
	<title>Re: [R] shQuote and cat</title>
	<published>2008-07-23T13:46:07Z</published>
	<updated>2008-07-23T13:46:07Z</updated>
	<author>
		<name>Vadim Organovich</name>
	</author>
	<content type="html">It is precizely a shell command that I am trying to generate. To be specific let's try to have R 'output' the following shell command: 'echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;'. This is is a valid command, at least in bash:
&lt;br&gt;bash-3.2$ echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;
&lt;br&gt;&amp;quot;a&amp;quot;
&lt;br&gt;&lt;br&gt;Now in R:
&lt;br&gt;&amp;gt; x &amp;lt;- 'echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;'
&lt;br&gt;&amp;gt; cat(x, '\n')
&lt;br&gt;echo &amp;quot;&amp;quot;a&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt; cat(shQuote(x), '\n')
&lt;br&gt;&amp;quot;echo \&amp;quot;\&amp;quot;a\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&lt;br&gt;Whichever way you do it it is not right. Again I think cat('echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;') should be printing *echo &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;* (asterics are not a part of the output)
&lt;br&gt;&lt;br&gt;________________________________________
&lt;br&gt;From: Duncan Murdoch [&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18620603&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;murdoch@...&lt;/a&gt;]
&lt;br&gt;Sent: Wednesday, July 23, 2008 2:38 PM
&lt;br&gt;To: Vadim Organovich
&lt;br&gt;Cc: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18620603&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-devel@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [Rd] [R] shQuote and cat
&lt;br&gt;&lt;br&gt;On 7/23/2008 2:53 PM, Vadim Organovich wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I feel like it now belongs to r-devel more than to r-help.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; My output was garbled because I sent the original message as HTML, sorry about that.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Your output, &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;, is what I get too. That is
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; cat(shQuote(shQuote(shQuote(&amp;quot;a&amp;quot;))), '\n')
&lt;br&gt;&amp;gt; &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt; , which I think should be &amp;quot;\&amp;quot;\\\&amp;quot;a\\\&amp;quot;\&amp;quot;&amp;quot;.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Actually, the R's output, &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;, is not even a valid string literal, that is
&lt;br&gt;&amp;gt;&amp;gt; x &amp;lt;- &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt; fails.
&lt;/div&gt;&lt;br&gt;It's not intended to be a string literal in R, it's intended to be input
&lt;br&gt;to the Windows CMD shell. &amp;nbsp;If you want a string literal in R, don't use
&lt;br&gt;cat(). &amp;nbsp;cat() shows you the naked contents of the string without any
&lt;br&gt;quoting to make it a valid string literal.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Now, by cat() being the inverse of shQuote() I mean printing the same literal as it goes into shQuote, quotes included:
&lt;br&gt;&amp;gt;&amp;gt; cat(shQuote(&amp;quot;a&amp;quot;), '\n')
&lt;br&gt;&amp;gt; &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; whereas
&lt;br&gt;&amp;gt;&amp;gt; cat(&amp;quot;a&amp;quot;, '\n')
&lt;br&gt;&amp;gt; a &amp;nbsp;## no quotes
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If cat() is not the inverse of shQuote() in the above sense, what is?
&lt;/div&gt;&lt;br&gt;On Unix-like systems I think asking the shell to echo the output, i.e.
&lt;br&gt;&lt;br&gt;system(paste(&amp;quot;echo&amp;quot;, shQuote(input)), intern=TRUE)
&lt;br&gt;&lt;br&gt;is intended to reproduce the input. &amp;nbsp;However, the Windows CMD shell is
&lt;br&gt;different. &amp;nbsp;I don't know how to strip quotes off a string in it, e.g. I see
&lt;br&gt;&lt;br&gt;C:\WINDOWS\system32 echo &amp;quot;a&amp;quot;
&lt;br&gt;&amp;quot;a&amp;quot;
&lt;br&gt;&lt;br&gt;Nevertheless, the quotes *are* necessary when passing filenames to
&lt;br&gt;commands, and they'll typically be stripped off when doing that, e.g.
&lt;br&gt;&lt;br&gt;echo hi &amp;gt;&amp;quot;a&amp;quot;
&lt;br&gt;&lt;br&gt;will create a file named a, not named &amp;quot;a&amp;quot;, and
&lt;br&gt;&lt;br&gt;echo hi &amp;gt;&amp;quot;a b&amp;quot;
&lt;br&gt;&lt;br&gt;will create a file with a space in the name.
&lt;br&gt;&lt;br&gt;Duncan Murdoch
&lt;br&gt;&lt;br&gt;Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. &amp;nbsp;Email transmission cannot be guaranteed to be secure or error-free. &amp;nbsp;Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. &amp;nbsp;This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product.
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18620603&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Re%3A--R--shQuote-and-cat-tp18618375p18620603.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18618827</id>
	<title>Re: [R] shQuote and cat</title>
	<published>2008-07-23T12:38:21Z</published>
	<updated>2008-07-23T12:38:21Z</updated>
	<author>
		<name>Duncan Murdoch-2</name>
	</author>
	<content type="html">On 7/23/2008 2:53 PM, Vadim Organovich wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; I feel like it now belongs to r-devel more than to r-help.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; My output was garbled because I sent the original message as HTML, sorry about that.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Your output, &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;, is what I get too. That is
&lt;br&gt;&amp;gt; &amp;nbsp;&amp;gt; cat(shQuote(shQuote(shQuote(&amp;quot;a&amp;quot;))), '\n')
&lt;br&gt;&amp;gt; &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt; , which I think should be &amp;quot;\&amp;quot;\\\&amp;quot;a\\\&amp;quot;\&amp;quot;&amp;quot;.
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Actually, the R's output, &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;, is not even a valid string literal, that is
&lt;br&gt;&amp;gt;&amp;gt; x &amp;lt;- &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt; fails.
&lt;/div&gt;&lt;br&gt;It's not intended to be a string literal in R, it's intended to be input 
&lt;br&gt;to the Windows CMD shell. &amp;nbsp;If you want a string literal in R, don't use 
&lt;br&gt;cat(). &amp;nbsp;cat() shows you the naked contents of the string without any 
&lt;br&gt;quoting to make it a valid string literal.
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; Now, by cat() being the inverse of shQuote() I mean printing the same literal as it goes into shQuote, quotes included:
&lt;br&gt;&amp;gt;&amp;gt; cat(shQuote(&amp;quot;a&amp;quot;), '\n')
&lt;br&gt;&amp;gt; &amp;quot;a&amp;quot;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; whereas
&lt;br&gt;&amp;gt;&amp;gt; cat(&amp;quot;a&amp;quot;, '\n')
&lt;br&gt;&amp;gt; a &amp;nbsp;## no quotes
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; If cat() is not the inverse of shQuote() in the above sense, what is?
&lt;/div&gt;&lt;br&gt;On Unix-like systems I think asking the shell to echo the output, i.e.
&lt;br&gt;&lt;br&gt;system(paste(&amp;quot;echo&amp;quot;, shQuote(input)), intern=TRUE)
&lt;br&gt;&lt;br&gt;is intended to reproduce the input. &amp;nbsp;However, the Windows CMD shell is 
&lt;br&gt;different. &amp;nbsp;I don't know how to strip quotes off a string in it, e.g. I see
&lt;br&gt;&lt;br&gt;C:\WINDOWS\system32 echo &amp;quot;a&amp;quot;
&lt;br&gt;&amp;quot;a&amp;quot;
&lt;br&gt;&lt;br&gt;Nevertheless, the quotes *are* necessary when passing filenames to 
&lt;br&gt;commands, and they'll typically be stripped off when doing that, e.g.
&lt;br&gt;&lt;br&gt;echo hi &amp;gt;&amp;quot;a&amp;quot;
&lt;br&gt;&lt;br&gt;will create a file named a, not named &amp;quot;a&amp;quot;, and
&lt;br&gt;&lt;br&gt;echo hi &amp;gt;&amp;quot;a b&amp;quot;
&lt;br&gt;&lt;br&gt;will create a file with a space in the name.
&lt;br&gt;&lt;br&gt;Duncan Murdoch
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18618827&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Re%3A--R--shQuote-and-cat-tp18618375p18618827.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18618375</id>
	<title>Re: [R] shQuote and cat</title>
	<published>2008-07-23T11:53:04Z</published>
	<updated>2008-07-23T11:53:04Z</updated>
	<author>
		<name>Vadim Organovich</name>
	</author>
	<content type="html">I feel like it now belongs to r-devel more than to r-help.
&lt;br&gt;&lt;br&gt;My output was garbled because I sent the original message as HTML, sorry about that.
&lt;br&gt;&lt;br&gt;Your output, &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;, is what I get too. That is
&lt;br&gt;&amp;nbsp;&amp;gt; cat(shQuote(shQuote(shQuote(&amp;quot;a&amp;quot;))), '\n')
&lt;br&gt;&amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;, which I think should be &amp;quot;\&amp;quot;\\\&amp;quot;a\\\&amp;quot;\&amp;quot;&amp;quot;.
&lt;br&gt;&lt;br&gt;Actually, the R's output, &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;, is not even a valid string literal, that is
&lt;br&gt;&amp;gt; x &amp;lt;- &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;fails.
&lt;br&gt;&lt;br&gt;&lt;br&gt;Now, by cat() being the inverse of shQuote() I mean printing the same literal as it goes into shQuote, quotes included:
&lt;br&gt;&amp;gt; cat(shQuote(&amp;quot;a&amp;quot;), '\n')
&lt;br&gt;&amp;quot;a&amp;quot;
&lt;br&gt;&lt;br&gt;whereas
&lt;br&gt;&amp;gt; cat(&amp;quot;a&amp;quot;, '\n')
&lt;br&gt;a &amp;nbsp;## no quotes
&lt;br&gt;&lt;br&gt;If cat() is not the inverse of shQuote() in the above sense, what is?
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Vadim
&lt;br&gt;________________________________________
&lt;br&gt;From: Duncan Murdoch [&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18618375&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;murdoch@...&lt;/a&gt;]
&lt;br&gt;Sent: Wednesday, July 23, 2008 1:10 PM
&lt;br&gt;To: Vadim Organovich
&lt;br&gt;Cc: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18618375&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-help@...&lt;/a&gt;
&lt;br&gt;Subject: Re: [R] shQuote and cat
&lt;br&gt;&lt;br&gt;On 7/23/2008 12:20 PM, Vadim Organovich wrote:
&lt;br&gt;&amp;gt; Dear R-users,
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; It is my understanding that cat(shQuote(a.string)) should print the origintal a.string. Is this right?
&lt;br&gt;&lt;br&gt;No, cat(a.string) should print the original a.string. &amp;nbsp;shQuote(a.string)
&lt;br&gt;adds quotes so that a.string can be used in the shell.
&lt;br&gt;&lt;br&gt;&amp;gt; I am not sure cat() correctly prints strings which are generated by triple-shQuote():
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; shQuote(shQuote(&amp;quot;a&amp;quot;))
&lt;br&gt;&amp;gt; [1] &amp;quot;\&amp;quot;\\\&amp;quot;a\\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; cat(shQuote(shQuote(shQuote(&amp;quot;a&amp;quot;))), '\n')
&lt;br&gt;&amp;gt; &amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;lt;file://\\&amp;quot;a\\&amp;quot;\&amp;gt;&amp;quot;&amp;quot;
&lt;br&gt;&lt;br&gt;That's a very strange result. &amp;nbsp;I tried the obsolete version of R that
&lt;br&gt;you're using, and I didn't see it. I get this:
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt; cat(shQuote(shQuote(shQuote(&amp;quot;a&amp;quot;))), '\n')
&lt;br&gt;&amp;quot;\&amp;quot;\\&amp;quot;a\\&amp;quot;\&amp;quot;&amp;quot;
&lt;br&gt;&lt;br&gt;Duncan Murdoch
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; As you can see the latter string has fewer quoting '\' than the former.
&lt;br&gt;&amp;gt; cat() of double shQuote works as expected:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; shQuote(&amp;quot;a&amp;quot;)
&lt;br&gt;&amp;gt; [1] &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; cat(shQuote(shQuote(&amp;quot;a&amp;quot;)), '\n')
&lt;br&gt;&amp;gt; &amp;quot;\&amp;quot;a\&amp;quot;&amp;quot;
&lt;br&gt;&amp;gt;&amp;gt; version
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_
&lt;br&gt;&amp;gt; platform &amp;nbsp; &amp;nbsp; &amp;nbsp; i386-pc-mingw32
&lt;br&gt;&amp;gt; arch &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i386
&lt;br&gt;&amp;gt; os &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mingw32
&lt;br&gt;&amp;gt; system &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; i386, mingw32
&lt;br&gt;&amp;gt; status
&lt;br&gt;&amp;gt; major &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2
&lt;br&gt;&amp;gt; minor &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;6.1
&lt;br&gt;&amp;gt; year &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2007
&lt;br&gt;&amp;gt; month &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;11
&lt;br&gt;&amp;gt; day &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;26
&lt;br&gt;&amp;gt; svn rev &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;43537
&lt;br&gt;&amp;gt; language &amp;nbsp; &amp;nbsp; &amp;nbsp; R
&lt;br&gt;&amp;gt; version.string R version 2.6.1 (2007-11-26)
&lt;br&gt;&amp;gt; Am I missing something?
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Vadim
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ________________________________
&lt;br&gt;&amp;gt; Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. Email transmission cannot be guaranteed to be secure or error-free. Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; [[alternative HTML version deleted]]
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18618375&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-help@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-help&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-help&lt;/a&gt;&lt;br&gt;&amp;gt; PLEASE do read the posting guide &lt;a href=&quot;http://www.R-project.org/posting-guide.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.R-project.org/posting-guide.html&lt;/a&gt;&lt;br&gt;&amp;gt; and provide commented, minimal, self-contained, reproducible code.
&lt;/div&gt;&lt;br&gt;Note: This email is for the confidential use of the named addressee(s) only and may contain proprietary, confidential or privileged information. If you are not the intended recipient, you are hereby notified that any review, dissemination or copying of this email is strictly prohibited, and to please notify the sender immediately and destroy this email and any attachments. &amp;nbsp;Email transmission cannot be guaranteed to be secure or error-free. &amp;nbsp;Jump Trading, therefore, does not make any guarantees as to the completeness or accuracy of this email or any attachments. &amp;nbsp;This email is for informational purposes only and does not constitute a recommendation, offer, request or solicitation of any kind to buy, sell, subscribe, redeem or perform any type of transaction of a financial product.
&lt;br&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18618375&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Re%3A--R--shQuote-and-cat-tp18618375p18618375.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18616069</id>
	<title>Re: Clash between 'Cairo' and 'EBImage' packages on Windows</title>
	<published>2008-07-23T09:11:05Z</published>
	<updated>2008-07-23T09:11:05Z</updated>
	<author>
		<name>Simon Urbanek</name>
	</author>
	<content type="html">&lt;br&gt;On Jul 23, 2008, at 11:47 , Uwe Ligges wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Simon Urbanek wrote:
&lt;br&gt;&amp;gt;&amp;gt; On Jul 23, 2008, at 6:21 , Prof Brian Ripley wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I updated one of by Windows' boxes to GTK 2.12.9, and replaced the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; libcairo-2.dll in the Cairo binary distribution by that from GTK &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 2.12.9.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; At that point Cairo and EBImage worked together, in either order.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I think Uwe may need to trigger a rebuild of his Cairo binary to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; pick up Simon's updated libcairo-2.dll -- the existing binary is &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; not compatible with GTK 2.12.9.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I have released a new version of Cario on Monday just to trigger &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; this, so once CRAN is updated it should happen automatically.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; Sorry, I'm currently a bit short of time:
&lt;br&gt;&amp;gt; - Should I install GTK 2.12.9 or does it work with older versions?
&lt;br&gt;&amp;gt; - So do I understand alright that I do not need to trigger anything &amp;nbsp;
&lt;br&gt;&amp;gt; yet?
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;As far as I am concerned nothing needs to be done - Cairo package &amp;nbsp;
&lt;br&gt;pulls its own copy of libcairo-2 (1.6.4 which comes from GTK+) when &amp;nbsp;
&lt;br&gt;built and I have submitted a new version of Cairo to CRAN few days ago &amp;nbsp;
&lt;br&gt;so hopefully it will appear there sometime.
&lt;br&gt;I don't know what EBImage needs, though...
&lt;br&gt;&lt;br&gt;Cheers,
&lt;br&gt;Simon
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt;&amp;gt; Simon
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Tue, 22 Jul 2008, Prof Brian Ripley wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Mon, 21 Jul 2008, Simon Urbanek wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Brian,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; thanks for the analysis.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Jul 21, 2008, at 6:29 , Prof Brian Ripley wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Mon, 21 Jul 2008, Sklyar, Oleg (London) wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; EBImage is dynamically linked against GTK, which includes cairo
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; libraries, so those are installed along with GTK. Cairo seems &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; to be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; statically linking to libcairo.dll.a. I would assume that if &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; it is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; That is an import library, so it is actually linked to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; libcairo-2.dll, which it ships.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; linked statically it should not get confused with a shared &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; present elsewhere in the path, but it looks like it does. I &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; have no
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; solution for that because unlike Cairo I cannot not statically &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; link
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; EBImage to GTK as it is not one library that I need, but a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; bunch of
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; those.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Linux you won't get this problem as it uses the same &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; centrally
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; installed Cairo library.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In a way it would be better, if Cairo relied on the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; gladewin32.sf.net
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; which normally provides GTK (and thus cairo libraries) for &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Windows and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; linked dynamically, but probably to simplify user &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; installations the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; developers wanted to avoid this.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; It _is_ using dynamic loading, or there would be no conflict. &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; From the names, it looks very like that it is using a DLL from &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; gladewin32.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The real issue looks rather like a versioning problem, that the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; cairo libraries installed as part of GTK and used by EBImage &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; are way too old (cairo_pdf_surface_create was added at cairo &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1.2, and cairo is at 1.6.4). So updating to the current GTK &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; distribution may be all that is needed (and Henrik could also &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; try replacing your GTK's libcairo-2.dll by that distributed &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; with Cairo).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For compatibility sake I have updated the libcairo binary to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1.6.4 (based on GTK+ build), so if EBImage gets updated all &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; should be well.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; EBImage relies on a user installation of GTK (AFAICS). &amp;nbsp;Last &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; night I updated my GTK to 2.12.9 and used that's libcairo-2.dll &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; in Cairo. It all seemed to work.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; There is not much I can do now about this, but I will follow &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the thread
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; if anybody comes up with an idea to change the code if possible
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The Cairo package (which ships DLLs) could rename them, as R &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; itself does where it builds its own versions. &amp;nbsp;Or it could link &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; statically (if that works, which it does not for e.g. package &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; XML).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'd rather not maintain my own build of libcairo for Windows &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; since I don't use it. I may consider renaming the DLL, but given &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; that I'm not building it from sources I'm not sure whether there &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; is a trivial way to do that.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; If you are not building it yourself, then the only way is to use &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; an editor on the DLL to change the embedded name. &amp;nbsp;I wouldn't &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; suggest you do that (I had thought you were building it yourself).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Best,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Simon
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I don't really understand why this was posted to R-devel: it is &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; not an R issue.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Dr Oleg Sklyar
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Technology Group
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Man Investments Ltd
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; +44 (0)20 7144 3803
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;osklyar@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-devel-bounces@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-devel-bounces@...&lt;/a&gt;] On Behalf Of Henrik &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Bengtsson
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Sent: 19 July 2008 19:26
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To: R-devel
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Subject: [Rd] Clash between 'Cairo' and 'EBImage' packages on &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Windows
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; on Windows XP Pro with R version 2.7.1 Patched (2008-06-27
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; r46012) the 'Cairo' and the 'EBImage' packages does not play
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; well together.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Loading EBImage before Cairo cause the following to happen:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; # Rterm --vanilla
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(EBImage);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(Cairo)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error in inDL(x, as.logical(local), as.logical(now), ...) :
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unable to load shared library
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 'C:/PROGRA~1/R/R-2.7.1pat/library/Cairo/libs/Cai
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ro.dll':
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; LoadLibrary failure: &amp;nbsp;The specified procedure could not be &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; found.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error : .onLoad failed in 'loadNamespace' for 'Cairo'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error: package/namespace load failed for 'Cairo'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; with a dialog titled 'Rterm.exe - Entry Point Not Found'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; saying 'The procedure entry point cairo_pdf_surface_create
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; could not be located in the dynamic link library &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; libcairo-2.dll'.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Loading the packages in the reverse order works, but the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Rterm seems unstable, e.g. calling q() immediately after will
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; exit the R session without questions:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; # Rterm --vanilla
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(Cairo)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(EBImage)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; q()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [Immediately back to the command line].
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I cannot reproduce the problem on R v2.7.1 on Ubuntu Hardy.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; sessionInfo()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; R version 2.7.1 Patched (2008-06-27 r46012)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; i386-pc-mingw32
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; locale:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; States.1252;LC_MON ETARY=English_United
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; attached base packages:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [1] stats &amp;nbsp; &amp;nbsp; graphics &amp;nbsp;grDevices utils &amp;nbsp; &amp;nbsp; datasets &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; methods &amp;nbsp; base
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; other attached packages:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [1] EBImage_2.4.0 Cairo_1.4-2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Cheers
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Henrik
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; **********************************************************************
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The contents of this email are for the named addressee(s... 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; {{dropped:22}}
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Brian D. Ripley, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ripley@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Professor of Applied Statistics, &amp;nbsp;&lt;a href=&quot;http://www.stats.ox.ac.uk/~ripley/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stats.ox.ac.uk/~ripley/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; University of Oxford, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tel: &amp;nbsp;+44 1865 272861 (self)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1 South Parks Road, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +44 1865 272866 (PA)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Oxford OX1 3TG, UK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp;+44 1865 272595
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Brian D. Ripley, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ripley@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Professor of Applied Statistics, &amp;nbsp;&lt;a href=&quot;http://www.stats.ox.ac.uk/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stats.ox.ac.uk/&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ~ripley/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; University of Oxford, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tel: &amp;nbsp;+44 1865 272861 (self)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1 South Parks Road, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +44 1865 272866 (PA)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Oxford OX1 3TG, UK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp;+44 1865 272595
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Brian D. Ripley, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ripley@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Professor of Applied Statistics, &amp;nbsp;&lt;a href=&quot;http://www.stats.ox.ac.uk/~ripley/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stats.ox.ac.uk/~ripley/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; University of Oxford, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tel: &amp;nbsp;+44 1865 272861 (self)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 1 South Parks Road, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +44 1865 272866 (PA)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Oxford OX1 3TG, UK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp;+44 1865 272595
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18616069&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Clash-between-%27Cairo%27-and-%27EBImage%27-packages-on-Windows-tp18547411p18616069.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18615887</id>
	<title>Re: Clash between 'Cairo' and 'EBImage' packages on Windows</title>
	<published>2008-07-23T08:47:51Z</published>
	<updated>2008-07-23T08:47:51Z</updated>
	<author>
		<name>Uwe Ligges-3</name>
	</author>
	<content type="html">&lt;br&gt;&lt;br&gt;Simon Urbanek wrote:
&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; On Jul 23, 2008, at 6:21 , Prof Brian Ripley wrote:
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; I updated one of by Windows' boxes to GTK 2.12.9, and replaced the 
&lt;br&gt;&amp;gt;&amp;gt; libcairo-2.dll in the Cairo binary distribution by that from GTK 2.12.9.
&lt;br&gt;&amp;gt;&amp;gt; At that point Cairo and EBImage worked together, in either order.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; I think Uwe may need to trigger a rebuild of his Cairo binary to pick 
&lt;br&gt;&amp;gt;&amp;gt; up Simon's updated libcairo-2.dll -- the existing binary is not 
&lt;br&gt;&amp;gt;&amp;gt; compatible with GTK 2.12.9.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; I have released a new version of Cario on Monday just to trigger this, 
&lt;br&gt;&amp;gt; so once CRAN is updated it should happen automatically.
&lt;/div&gt;&lt;br&gt;Sorry, I'm currently a bit short of time:
&lt;br&gt;- Should I install GTK 2.12.9 or does it work with older versions?
&lt;br&gt;- So do I understand alright that I do not need to trigger anything yet?
&lt;br&gt;&lt;br&gt;Best,
&lt;br&gt;Uwe
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; Thanks,
&lt;br&gt;&amp;gt; Simon
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; On Tue, 22 Jul 2008, Prof Brian Ripley wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Mon, 21 Jul 2008, Simon Urbanek wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Brian,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; thanks for the analysis.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Jul 21, 2008, at 6:29 , Prof Brian Ripley wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Mon, 21 Jul 2008, Sklyar, Oleg (London) wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; EBImage is dynamically linked against GTK, which includes cairo
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; libraries, so those are installed along with GTK. Cairo seems to be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; statically linking to libcairo.dll.a. I would assume that if it is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; That is an import library, so it is actually linked to 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; libcairo-2.dll, which it ships.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; linked statically it should not get confused with a shared library
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; present elsewhere in the path, but it looks like it does. I have no
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; solution for that because unlike Cairo I cannot not statically link
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; EBImage to GTK as it is not one library that I need, but a bunch of
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; those.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Linux you won't get this problem as it uses the same centrally
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; installed Cairo library.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In a way it would be better, if Cairo relied on the gladewin32.sf.net
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; which normally provides GTK (and thus cairo libraries) for Windows 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; linked dynamically, but probably to simplify user installations the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; developers wanted to avoid this.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; It _is_ using dynamic loading, or there would be no conflict. &amp;nbsp;From 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the names, it looks very like that it is using a DLL from gladewin32.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The real issue looks rather like a versioning problem, that the 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; cairo libraries installed as part of GTK and used by EBImage are 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; way too old (cairo_pdf_surface_create was added at cairo 1.2, and 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; cairo is at 1.6.4). So updating to the current GTK distribution may 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; be all that is needed (and Henrik could also try replacing your 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; GTK's libcairo-2.dll by that distributed with Cairo).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; For compatibility sake I have updated the libcairo binary to 1.6.4 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (based on GTK+ build), so if EBImage gets updated all should be well.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; EBImage relies on a user installation of GTK (AFAICS). &amp;nbsp;Last night I 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; updated my GTK to 2.12.9 and used that's libcairo-2.dll in Cairo. It 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; all seemed to work.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; There is not much I can do now about this, but I will follow the 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; thread
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; if anybody comes up with an idea to change the code if possible
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The Cairo package (which ships DLLs) could rename them, as R itself 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; does where it builds its own versions. &amp;nbsp;Or it could link statically 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; (if that works, which it does not for e.g. package XML).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I'd rather not maintain my own build of libcairo for Windows since I 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; don't use it. I may consider renaming the DLL, but given that I'm 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; not building it from sources I'm not sure whether there is a trivial 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; way to do that.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; If you are not building it yourself, then the only way is to use an 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; editor on the DLL to change the embedded name. &amp;nbsp;I wouldn't suggest 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; you do that (I had thought you were building it yourself).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Best,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Simon
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I don't really understand why this was posted to R-devel: it is not 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; an R issue.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Dr Oleg Sklyar
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Technology Group
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Man Investments Ltd
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; +44 (0)20 7144 3803
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;osklyar@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-devel-bounces@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-devel-bounces@...&lt;/a&gt;] On Behalf Of Henrik Bengtsson
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Sent: 19 July 2008 19:26
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To: R-devel
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Subject: [Rd] Clash between 'Cairo' and 'EBImage' packages on 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Windows
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; on Windows XP Pro with R version 2.7.1 Patched (2008-06-27
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; r46012) the 'Cairo' and the 'EBImage' packages does not play
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; well together.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Loading EBImage before Cairo cause the following to happen:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; # Rterm --vanilla
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(EBImage);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(Cairo)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error in inDL(x, as.logical(local), as.logical(now), ...) :
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unable to load shared library
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 'C:/PROGRA~1/R/R-2.7.1pat/library/Cairo/libs/Cai
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ro.dll':
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; LoadLibrary failure: &amp;nbsp;The specified procedure could not be found.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error : .onLoad failed in 'loadNamespace' for 'Cairo'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error: package/namespace load failed for 'Cairo'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; with a dialog titled 'Rterm.exe - Entry Point Not Found'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; saying 'The procedure entry point cairo_pdf_surface_create
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; could not be located in the dynamic link library libcairo-2.dll'.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Loading the packages in the reverse order works, but the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Rterm seems unstable, e.g. calling q() immediately after will
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; exit the R session without questions:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; # Rterm --vanilla
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(Cairo)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(EBImage)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; q()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [Immediately back to the command line].
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I cannot reproduce the problem on R v2.7.1 on Ubuntu Hardy.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; sessionInfo()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; R version 2.7.1 Patched (2008-06-27 r46012)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; i386-pc-mingw32
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; locale:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; States.1252;LC_MON ETARY=English_United
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; attached base packages:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [1] stats &amp;nbsp; &amp;nbsp; graphics &amp;nbsp;grDevices utils &amp;nbsp; &amp;nbsp; datasets &amp;nbsp;methods &amp;nbsp; base
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; other attached packages:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [1] EBImage_2.4.0 Cairo_1.4-2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Cheers
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Henrik
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ********************************************************************** 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The contents of this email are for the named 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; addressee(s...{{dropped:22}}
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Brian D. Ripley, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ripley@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Professor of Applied Statistics, &amp;nbsp;&lt;a href=&quot;http://www.stats.ox.ac.uk/~ripley/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stats.ox.ac.uk/~ripley/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; University of Oxford, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tel: &amp;nbsp;+44 1865 272861 (self)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1 South Parks Road, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +44 1865 272866 (PA)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Oxford OX1 3TG, UK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp;+44 1865 272595
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Brian D. Ripley, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ripley@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Professor of Applied Statistics, &amp;nbsp;&lt;a href=&quot;http://www.stats.ox.ac.uk/~ripley/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stats.ox.ac.uk/~ripley/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; University of Oxford, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tel: &amp;nbsp;+44 1865 272861 (self)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 1 South Parks Road, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +44 1865 272866 (PA)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Oxford OX1 3TG, UK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp;+44 1865 272595
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt; Brian D. Ripley, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ripley@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; Professor of Applied Statistics, &amp;nbsp;&lt;a href=&quot;http://www.stats.ox.ac.uk/~ripley/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stats.ox.ac.uk/~ripley/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; University of Oxford, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tel: &amp;nbsp;+44 1865 272861 (self)
&lt;br&gt;&amp;gt;&amp;gt; 1 South Parks Road, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +44 1865 272866 (PA)
&lt;br&gt;&amp;gt;&amp;gt; Oxford OX1 3TG, UK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp;+44 1865 272595
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18615887&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Clash-between-%27Cairo%27-and-%27EBImage%27-packages-on-Windows-tp18547411p18615887.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18610763</id>
	<title>Re: Clash between 'Cairo' and 'EBImage' packages on Windows</title>
	<published>2008-07-23T06:05:13Z</published>
	<updated>2008-07-23T06:05:13Z</updated>
	<author>
		<name>Simon Urbanek</name>
	</author>
	<content type="html">&lt;br&gt;On Jul 23, 2008, at 6:21 , Prof Brian Ripley wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I updated one of by Windows' boxes to GTK 2.12.9, and replaced the &amp;nbsp;
&lt;br&gt;&amp;gt; libcairo-2.dll in the Cairo binary distribution by that from GTK &amp;nbsp;
&lt;br&gt;&amp;gt; 2.12.9.
&lt;br&gt;&amp;gt; At that point Cairo and EBImage worked together, in either order.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; I think Uwe may need to trigger a rebuild of his Cairo binary to &amp;nbsp;
&lt;br&gt;&amp;gt; pick up Simon's updated libcairo-2.dll -- the existing binary is not &amp;nbsp;
&lt;br&gt;&amp;gt; compatible with GTK 2.12.9.
&lt;br&gt;&amp;gt;
&lt;br&gt;&lt;br&gt;I have released a new version of Cario on Monday just to trigger this, &amp;nbsp;
&lt;br&gt;so once CRAN is updated it should happen automatically.
&lt;br&gt;&lt;br&gt;Thanks,
&lt;br&gt;Simon
&lt;br&gt;&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Tue, 22 Jul 2008, Prof Brian Ripley wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; On Mon, 21 Jul 2008, Simon Urbanek wrote:
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Brian,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; thanks for the analysis.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Jul 21, 2008, at 6:29 , Prof Brian Ripley wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Mon, 21 Jul 2008, Sklyar, Oleg (London) wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; EBImage is dynamically linked against GTK, which includes cairo
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; libraries, so those are installed along with GTK. Cairo seems to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; statically linking to libcairo.dll.a. I would assume that if it is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; That is an import library, so it is actually linked to &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; libcairo-2.dll, which it ships.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; linked statically it should not get confused with a shared library
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; present elsewhere in the path, but it looks like it does. I have &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; no
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; solution for that because unlike Cairo I cannot not statically &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; link
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; EBImage to GTK as it is not one library that I need, but a bunch &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; of
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; those.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Linux you won't get this problem as it uses the same centrally
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; installed Cairo library.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In a way it would be better, if Cairo relied on the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; gladewin32.sf.net
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; which normally provides GTK (and thus cairo libraries) for &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Windows and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; linked dynamically, but probably to simplify user installations &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; developers wanted to avoid this.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; It _is_ using dynamic loading, or there would be no conflict. &amp;nbsp; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; From the names, it looks very like that it is using a DLL from &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; gladewin32.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The real issue looks rather like a versioning problem, that the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; cairo libraries installed as part of GTK and used by EBImage are &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; way too old (cairo_pdf_surface_create was added at cairo 1.2, and &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; cairo is at 1.6.4). So updating to the current GTK distribution &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; may be all that is needed (and Henrik could also try replacing &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; your GTK's libcairo-2.dll by that distributed with Cairo).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; For compatibility sake I have updated the libcairo binary to 1.6.4 &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; (based on GTK+ build), so if EBImage gets updated all should be &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; well.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; EBImage relies on a user installation of GTK (AFAICS). &amp;nbsp;Last night &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; I updated my GTK to 2.12.9 and used that's libcairo-2.dll in Cairo. &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; It all seemed to work.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; There is not much I can do now about this, but I will follow the &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; thread
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; if anybody comes up with an idea to change the code if possible
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The Cairo package (which ships DLLs) could rename them, as R &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; itself does where it builds its own versions. &amp;nbsp;Or it could link &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; statically (if that works, which it does not for e.g. package XML).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I'd rather not maintain my own build of libcairo for Windows since &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I don't use it. I may consider renaming the DLL, but given that &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I'm not building it from sources I'm not sure whether there is a &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; trivial way to do that.
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; If you are not building it yourself, then the only way is to use an &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; editor on the DLL to change the embedded name. &amp;nbsp;I wouldn't suggest &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt; you do that (I had thought you were building it yourself).
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Best,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Simon
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I don't really understand why this was posted to R-devel: it is &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; not an R issue.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Dr Oleg Sklyar
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Technology Group
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Man Investments Ltd
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; +44 (0)20 7144 3803
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;osklyar@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-devel-bounces@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-devel-bounces@...&lt;/a&gt;] On Behalf Of Henrik &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Bengtsson
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Sent: 19 July 2008 19:26
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To: R-devel
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Subject: [Rd] Clash between 'Cairo' and 'EBImage' packages on &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Windows
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; on Windows XP Pro with R version 2.7.1 Patched (2008-06-27
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; r46012) the 'Cairo' and the 'EBImage' packages does not play
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; well together.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Loading EBImage before Cairo cause the following to happen:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; # Rterm --vanilla
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(EBImage);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(Cairo)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error in inDL(x, as.logical(local), as.logical(now), ...) :
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unable to load shared library
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 'C:/PROGRA~1/R/R-2.7.1pat/library/Cairo/libs/Cai
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ro.dll':
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; LoadLibrary failure: &amp;nbsp;The specified procedure could not be found.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error : .onLoad failed in 'loadNamespace' for 'Cairo'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error: package/namespace load failed for 'Cairo'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; with a dialog titled 'Rterm.exe - Entry Point Not Found'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; saying 'The procedure entry point cairo_pdf_surface_create
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; could not be located in the dynamic link library libcairo-2.dll'.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Loading the packages in the reverse order works, but the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Rterm seems unstable, e.g. calling q() immediately after will
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; exit the R session without questions:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; # Rterm --vanilla
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(Cairo)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(EBImage)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; q()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [Immediately back to the command line].
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I cannot reproduce the problem on R v2.7.1 on Ubuntu Hardy.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; sessionInfo()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; R version 2.7.1 Patched (2008-06-27 r46012)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; i386-pc-mingw32
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; locale:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; States.1252;LC_MON ETARY=English_United
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; attached base packages:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [1] stats &amp;nbsp; &amp;nbsp; graphics &amp;nbsp;grDevices utils &amp;nbsp; &amp;nbsp; datasets &amp;nbsp;methods &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; base
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; other attached packages:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [1] EBImage_2.4.0 Cairo_1.4-2
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Cheers
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Henrik
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; **********************************************************************
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; The contents of this email are for the named addressee(s... 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; {{dropped:22}}
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=4&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Brian D. Ripley, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=5&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ripley@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Professor of Applied Statistics, &amp;nbsp;&lt;a href=&quot;http://www.stats.ox.ac.uk/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stats.ox.ac.uk/&lt;/a&gt;&amp;nbsp;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ~ripley/
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; University of Oxford, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tel: &amp;nbsp;+44 1865 272861 (self)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 1 South Parks Road, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +44 1865 272866 (PA)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Oxford OX1 3TG, UK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp;+44 1865 272595
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=6&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=7&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; -- 
&lt;br&gt;&amp;gt;&amp;gt; Brian D. Ripley, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=8&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ripley@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt; Professor of Applied Statistics, &amp;nbsp;&lt;a href=&quot;http://www.stats.ox.ac.uk/~ripley/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stats.ox.ac.uk/~ripley/&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt; University of Oxford, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tel: &amp;nbsp;+44 1865 272861 (self)
&lt;br&gt;&amp;gt;&amp;gt; 1 South Parks Road, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +44 1865 272866 (PA)
&lt;br&gt;&amp;gt;&amp;gt; Oxford OX1 3TG, UK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp;+44 1865 272595
&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; ______________________________________________
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=9&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&amp;gt;&amp;gt; &lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;&amp;gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; -- 
&lt;br&gt;&amp;gt; Brian D. Ripley, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=10&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ripley@...&lt;/a&gt;
&lt;br&gt;&amp;gt; Professor of Applied Statistics, &amp;nbsp;&lt;a href=&quot;http://www.stats.ox.ac.uk/~ripley/&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://www.stats.ox.ac.uk/~ripley/&lt;/a&gt;&lt;br&gt;&amp;gt; University of Oxford, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Tel: &amp;nbsp;+44 1865 272861 (self)
&lt;br&gt;&amp;gt; 1 South Parks Road, &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; +44 1865 272866 (PA)
&lt;br&gt;&amp;gt; Oxford OX1 3TG, UK &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Fax: &amp;nbsp;+44 1865 272595
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;
&lt;/div&gt;&lt;br&gt;______________________________________________
&lt;br&gt;&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18610763&amp;i=11&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;R-devel@...&lt;/a&gt; mailing list
&lt;br&gt;&lt;a href=&quot;https://stat.ethz.ch/mailman/listinfo/r-devel&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;https://stat.ethz.ch/mailman/listinfo/r-devel&lt;/a&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://www.nabble.com/Clash-between-%27Cairo%27-and-%27EBImage%27-packages-on-Windows-tp18547411p18610763.html" />
</entry>

<entry>
	<id>tag:www.nabble.com,2006:post-18608544</id>
	<title>Re: Clash between 'Cairo' and 'EBImage' packages on Windows</title>
	<published>2008-07-23T03:21:29Z</published>
	<updated>2008-07-23T03:21:29Z</updated>
	<author>
		<name>Prof Brian Ripley</name>
	</author>
	<content type="html">I updated one of by Windows' boxes to GTK 2.12.9, and replaced the 
&lt;br&gt;libcairo-2.dll in the Cairo binary distribution by that from GTK 2.12.9.
&lt;br&gt;At that point Cairo and EBImage worked together, in either order.
&lt;br&gt;&lt;br&gt;I think Uwe may need to trigger a rebuild of his Cairo binary to pick up 
&lt;br&gt;Simon's updated libcairo-2.dll -- the existing binary is not compatible 
&lt;br&gt;with GTK 2.12.9.
&lt;br&gt;&lt;br&gt;On Tue, 22 Jul 2008, Prof Brian Ripley wrote:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt; On Mon, 21 Jul 2008, Simon Urbanek wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; Brian,
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; thanks for the analysis.
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; On Jul 21, 2008, at 6:29 , Prof Brian Ripley wrote:
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; On Mon, 21 Jul 2008, Sklyar, Oleg (London) wrote:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; EBImage is dynamically linked against GTK, which includes cairo
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; libraries, so those are installed along with GTK. Cairo seems to be
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; statically linking to libcairo.dll.a. I would assume that if it is
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; That is an import library, so it is actually linked to libcairo-2.dll, 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; which it ships.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; linked statically it should not get confused with a shared library
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; present elsewhere in the path, but it looks like it does. I have no
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; solution for that because unlike Cairo I cannot not statically link
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; EBImage to GTK as it is not one library that I need, but a bunch of
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; those.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; On Linux you won't get this problem as it uses the same centrally
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; installed Cairo library.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; In a way it would be better, if Cairo relied on the gladewin32.sf.net
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; which normally provides GTK (and thus cairo libraries) for Windows and
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; linked dynamically, but probably to simplify user installations the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; developers wanted to avoid this.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; It _is_ using dynamic loading, or there would be no conflict. &amp;nbsp;From the 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; names, it looks very like that it is using a DLL from gladewin32.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The real issue looks rather like a versioning problem, that the cairo 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; libraries installed as part of GTK and used by EBImage are way too old 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; (cairo_pdf_surface_create was added at cairo 1.2, and cairo is at 1.6.4). 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; So updating to the current GTK distribution may be all that is needed (and 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; Henrik could also try replacing your GTK's libcairo-2.dll by that 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; distributed with Cairo).
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; For compatibility sake I have updated the libcairo binary to 1.6.4 (based 
&lt;br&gt;&amp;gt;&amp;gt; on GTK+ build), so if EBImage gets updated all should be well.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; EBImage relies on a user installation of GTK (AFAICS). &amp;nbsp;Last night I updated 
&lt;br&gt;&amp;gt; my GTK to 2.12.9 and used that's libcairo-2.dll in Cairo. It all seemed to 
&lt;br&gt;&amp;gt; work.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; There is not much I can do now about this, but I will follow the thread
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; if anybody comes up with an idea to change the code if possible
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; The Cairo package (which ships DLLs) could rename them, as R itself does 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; where it builds its own versions. &amp;nbsp;Or it could link statically (if that 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; works, which it does not for e.g. package XML).
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; I'd rather not maintain my own build of libcairo for Windows since I don't 
&lt;br&gt;&amp;gt;&amp;gt; use it. I may consider renaming the DLL, but given that I'm not building it 
&lt;br&gt;&amp;gt;&amp;gt; from sources I'm not sure whether there is a trivial way to do that.
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; If you are not building it yourself, then the only way is to use an editor on 
&lt;br&gt;&amp;gt; the DLL to change the embedded name. &amp;nbsp;I wouldn't suggest you do that (I had 
&lt;br&gt;&amp;gt; thought you were building it yourself).
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; Best,
&lt;br&gt;&amp;gt;&amp;gt; Simon
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; I don't really understand why this was posted to R-devel: it is not an R 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; issue.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Dr Oleg Sklyar
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Technology Group
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Man Investments Ltd
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; +44 (0)20 7144 3803
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18608544&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;osklyar@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; -----Original Message-----
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; From: &lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18608544&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-devel-bounces@...&lt;/a&gt;
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [mailto:&lt;a href=&quot;http://www.nabble.com/user/SendEmail.jtp?type=post&amp;post=18608544&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;r-devel-bounces@...&lt;/a&gt;] On Behalf Of Henrik Bengtsson
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Sent: 19 July 2008 19:26
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; To: R-devel
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Subject: [Rd] Clash between 'Cairo' and 'EBImage' packages on Windows
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Hi,
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; on Windows XP Pro with R version 2.7.1 Patched (2008-06-27
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; r46012) the 'Cairo' and the 'EBImage' packages does not play
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; well together.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Loading EBImage before Cairo cause the following to happen:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; # Rterm --vanilla
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(EBImage);
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(Cairo)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error in inDL(x, as.logical(local), as.logical(now), ...) :
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; unable to load shared library
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 'C:/PROGRA~1/R/R-2.7.1pat/library/Cairo/libs/Cai
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; ro.dll':
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; LoadLibrary failure: &amp;nbsp;The specified procedure could not be found.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error : .onLoad failed in 'loadNamespace' for 'Cairo'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Error: package/namespace load failed for 'Cairo'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; with a dialog titled 'Rterm.exe - Entry Point Not Found'
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; saying 'The procedure entry point cairo_pdf_surface_create
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; could not be located in the dynamic link library libcairo-2.dll'.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Loading the packages in the reverse order works, but the
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; Rterm seems unstable, e.g. calling q() immediately after will
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; exit the R session without questions:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; # Rterm --vanilla
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(Cairo)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; library(EBImage)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; q()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; [Immediately back to the command line].
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; I cannot reproduce the problem on R v2.7.1 on Ubuntu Hardy.
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; sessionInfo()
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; R version 2.7.1 Patched (2008-06-27 r46012)
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; i386-pc-mingw32
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; 
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; locale:
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; LC_COLLATE=English_United States.1252;LC_CTYPE=English_United
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; States.1252;LC_MON ETARY=English_United
&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&