<div>
<p>Dear carson,</p>
<p>I tried the manageR plugin 0.04 yesterday night and loved the way of coupling with R.<br>I have two suggections/improvements for manageR. But not sure, it is the general <br>situation or specific to my environment. R is <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://2.6.1./" target="_blank">2.6.1.</a> QGIS is 0.9.2-rc1-Ganymede.</p>

<p>1. Although rgdal is installed on Ubuntu Gutsy 7.1, manageR could not find it.<br>Sometimes, external R packages like rgdal could not be installed on default folder with <br>install.packages() commands. In my case, I could not installed it under default<br>
folder, because it has not got a write permission on default folder in Ubuntu, <br>or the user can delibaretly install the packages under different folders. </p>
<p>So, I recommend you to search user specified folders. <br>This path can be return in R as below. </p>
<p># it seems that rgdal is not installed. <br># search() is not enough for user/custom package installation paths.<br>&gt; search()<br>[1] &quot;.GlobalEnv&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;package:stats&quot;&nbsp;&nbsp;&nbsp;&nbsp; &quot;package:graphics&quot; <br>
[4] &quot;package:grDevices&quot; &quot;package:utils&quot;&nbsp;&nbsp;&nbsp;&nbsp; &quot;package:datasets&quot; <br>[7] &quot;package:methods&quot;&nbsp;&nbsp; &quot;Autoloads&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;package:base&quot;&nbsp;&nbsp;&nbsp;&nbsp; </p>
<p># .libPaths() returns all paths that the packages are installed.<br>&gt; .libPaths()<br>[1] &quot;/home/vkepoglu/R/i486-pc-linux-gnu-library/2.5&quot;<br>[2] &quot;/usr/local/lib/R/library&quot;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </p>

<p># rgdal can be loaded directly with library() inside R, but not inside of python,<br># due to different path installation.<br>&gt; library(rgdal)<br>Loading required package: sp</p>
<p>Geospatial Data Abstraction Library extensions to R successfully loaded<br>&gt; </p>
<p># so please, also add &quot;lib.loc&quot; options in your plugin code. for example:<br>&gt; library(maptools, lib.loc=.libPaths()[1])<br>Loading required package: foreign<br>&gt; </p>
<p>2. About unicode<br>I have turkish characters. In general, we use utf-8 unicode. In QGIS, no error occurs<br>due to turkish characters. I can add those files (has turkish characters in file name or in path).<br>In the open file dialog of QGIS, at the bottom encoding is System, by default. No need to change it.<br>
It is working. I know that utf-8 has almost all characters in the world,<br>I suppose. I changed latin1 in your plugin to utf-8. In both cases <br>(tried latin1 or utf-8), the error is occured.&nbsp; I do not know, why?</p>
<p>If the path of added vector layer has turkish character like &quot;ğüşiçöĞÜŞİÖÇı&quot;, the error is:</p>
<p>An error has occured while executing Python code:</p>
<p>Traceback (most recent call last):<br>&nbsp;File &quot;/usr/local/share/qgis/python/plugins/manageR/domanageR.py&quot;, line 119, in load<br>&nbsp; self.convert(inName)<br>&nbsp;File &quot;/usr/local/share/qgis/python/plugins/manageR/domanageR.py&quot;, line 155, in convert<br>
&nbsp; self.commands(str(inName) + &quot; UnicodeEncodeError: &#39;ascii&#39; codec can&#39;t encode character<br>&nbsp; u&#39;\u015f&#39; in position 51: ordinal not in range(128)</p>
<p>If the name of added vector layer has turkish character (and path has no turkish character), the error is:</p>
<p>First says Unable to Load layer with message box, and then,</p>
<p>An error has occured while executing Python code:</p>
<p>Traceback (most recent call last):<br>&nbsp;File &quot;/usr/local/share/qgis/python/plugins/manageR/domanageR.py&quot;, line 119, in load<br>&nbsp; self.convert(inName)<br>&nbsp;File &quot;/usr/local/share/qgis/python/plugins/manageR/domanageR.py&quot;, line 144, in convert<br>
&nbsp; dsn = mlayer.source()<br>AttributeError: &#39;NoneType&#39; object has no attribute &#39;source&#39;</p>
<p>I also tried the plugin on win in which installed R but not rgdal.<br>the plugin installs rgdal via the normal R procedure. The procedure is working very well.<br></p>
<p>Unicode problem is very important for me. If you solve it, please, let me know.<br>I am thinking to use your plugin.</p>
<p>Regards,<br>volkan kepoglu</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>Date: Sun, 4 May 2008 18:18:37 +0000<br>From: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:cfarmer@uvic.ca" target="_blank">cfarmer@uvic.ca</a><br>Subject: [Qgis-user] Re: calculate statistics on an attribute table<br>
To: <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:qgis-user@lists.osgeo.org" target="_blank">qgis-user@lists.osgeo.org</a>, <a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:amagine@telus.net" target="_blank">amagine@telus.net</a><br>
Message-ID:<br>&nbsp; &nbsp; &nbsp; &nbsp;&lt;143599603-1209925102-cardhu_decombobulator_blackberry.rim.net-129579947-@bxe117.bisx.prod.on.blackberry&gt;<br><br>Content-Type: text/plain; charset=&quot;Windows-1252&quot;<br><br>Mars Sjoden pisze:<br>
<br>&gt; Is there a way to quickly calculate statistics on an attribute table<br><span></span>&gt; column?<br><br>I have created a plugin to do just this:<br><br>For those of<br>you who might be interested, the plugin is available via the plugin<br>
installer if you add<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.geog.uvic.ca/spar/carson/cfarmerQgisRepo.xml" target="_blank">http://www.geog.uvic.ca/spar/carson/cfarmerQgisRepo.xml</a> to your list of<br>
available QGIS plugin repositories:<br><br>Open plugin installer<br>Click add<br>Give &#39;cfarmer repository&#39; for name (or whatever you want...)<br>Give <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.geog.uvic.ca/spar/carson/cfarmerQgisRepo.xml" target="_blank">http://www.geog.uvic.ca/spar/carson/cfarmerQgisRepo.xml</a> for URL<br>
Click &#39;get list&#39;<br>And look for &#39;Calculate field statistics&#39; (I think that&#39;s what I named it?)<br>There are plenty of other tools there for you to check out as well...<br><br>Cheers,<br><br>Carson<br>
Sent from my BlackBerry&reg; wireless device</p></div>