<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>> search()<br>[1] ".GlobalEnv" "package:stats" "package:graphics" <br>
[4] "package:grDevices" "package:utils" "package:datasets" <br>[7] "package:methods" "Autoloads" "package:base" </p>
<p># .libPaths() returns all paths that the packages are installed.<br>> .libPaths()<br>[1] "/home/vkepoglu/R/i486-pc-linux-gnu-library/2.5"<br>[2] "/usr/local/lib/R/library" </p>
<p># rgdal can be loaded directly with library() inside R, but not inside of python,<br># due to different path installation.<br>> library(rgdal)<br>Loading required package: sp</p>
<p>Geospatial Data Abstraction Library extensions to R successfully loaded<br>> </p>
<p># so please, also add "lib.loc" options in your plugin code. for example:<br>> library(maptools, lib.loc=.libPaths()[1])<br>Loading required package: foreign<br>> </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. I do not know, why?</p>
<p>If the path of added vector layer has turkish character like "ğüşiçöĞÜŞİÖÇı", the error is:</p>
<p>An error has occured while executing Python code:</p>
<p>Traceback (most recent call last):<br> File "/usr/local/share/qgis/python/plugins/manageR/domanageR.py", line 119, in load<br> self.convert(inName)<br> File "/usr/local/share/qgis/python/plugins/manageR/domanageR.py", line 155, in convert<br>
self.commands(str(inName) + " UnicodeEncodeError: 'ascii' codec can't encode character<br> u'\u015f' 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> File "/usr/local/share/qgis/python/plugins/manageR/domanageR.py", line 119, in load<br> self.convert(inName)<br> File "/usr/local/share/qgis/python/plugins/manageR/domanageR.py", line 144, in convert<br>
dsn = mlayer.source()<br>AttributeError: 'NoneType' object has no attribute 'source'</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> </p>
<p> </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> <143599603-1209925102-cardhu_decombobulator_blackberry.rim.net-129579947-@bxe117.bisx.prod.on.blackberry><br><br>Content-Type: text/plain; charset="Windows-1252"<br><br>Mars Sjoden pisze:<br>
<br>> Is there a way to quickly calculate statistics on an attribute table<br><span></span>> 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 'cfarmer repository' 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 'get list'<br>And look for 'Calculate field statistics' (I think that'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® wireless device</p></div>