[Qgis-user] calculate statistics on an attribute table (Spqr install)
Burgholzer,Robert
rwburgholzer at deq.virginia.gov
Tue May 6 08:02:36 PDT 2008
Just a note about the Spqr plugin. I had a few problems in the install
that were not necessarily related to itself, but were certainly a pain
in the rear, and required some tracking.
First off, it requires rpy, which is all well and good, except that the
rpy package does not have a totally exhaustive list of modules that are
needed for compatibility with every version of R. My system had R 2.5.0
installed, and the set of .pyd files only had one for 2.5.1. This
yielded an error when loading the plugins menu (with the last line
containing the crucial information):
Traceback (most recent call last):
File "", line 2, in
File "C:/Program Files/Quantum GIS/./python/plugins\spqr\__init__.py",
line 5, in
from spqr import Spqr
File "C:/Program Files/Quantum GIS/./python/plugins\spqr\spqr.py", line
6, in
import doHistogram
File "C:/Program Files/Quantum
GIS/./python/plugins\spqr\doHistogram.py", line 6, in
import opsR
File "C:/Program Files/Quantum GIS/./python/plugins\spqr\opsR.py", line
7, in
import rpy
File "C:\Python25\lib\site-packages\rpy.py", line 134, in
""" % RVERSION)
RuntimeError: No module named _rpy2050
So, I upgraded to 2.5.1 (even though I could have gone higher, I didn't
want to risk breaking any of the packages that I have gotten together
thus far). However, when I opened QGis after upgrading, I was met with
a flood of errors during the plugin load process, all having to do with
the "Rconsole" file (in the R/R2.5.1/etc/Rconsole). After OK'ing the
final error, QGis refused to load. The errors were all in BLANK lines
however, which turned out to be a problem because it (who IT is I can
only guess, maybe python??) wanted Rconsole to be in Unix format, not PC
format as is the default for this Windows install. So, I saved it as
Unix format, and then all was fine, Qgis loaded without incident, and
the stats package ran.
r.b.
Robert W. Burgholzer
Surface Water Modeler
Office of Water Supply and Planning
Virginia Department of Environmental Quality
rwburgholzer at deq.virginia.gov
804-698-4405
Open Source Modeling Tools:
http://sourceforge.net/projects/npsource/
-----Original Message-----
From: qgis-user-bounces at lists.osgeo.org
[mailto:qgis-user-bounces at lists.osgeo.org] On Behalf Of Alessandro
Sarretta
Sent: Sunday, May 04, 2008 4:35 PM
To: Maciej Sieczka
Cc: qgis
Subject: Re: [Qgis-user] calculate statistics on an attribute table
With the spqr (http://www.maths.lancs.ac.uk/~rowlings/Software/Spqr/)
python-R plugin you can calculate some simple statistics.
Ale
Maciej Sieczka ha scritto:
> Mars Sjoden pisze:
>
>> Is there a way to quickly calculate statistics on an attribute table
>> column?
>
> Not that I know of. A workaround for doing this with external
software:
>
> 1. open attrubute table in QGIS
> 2. select all rows (select first one, go to bottom of the table, press
> ctrl selecting the last row)
> 3. ctrl+c
> 4. open some spreadsheat/statistics software
> 5. paste
>
> If your layer is PostGIS you can use PostgreSQL advanced stats
> features directly. If you want to put your SHP into PgSQL use the QGIS
> SPIT plugin or shp2pgsql CLI utility.
>
> Best,
> Maciek
>
> P.S.
>
> Please don't hi-jack threads.
>
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-user
> .
>
_______________________________________________
Qgis-user mailing list
Qgis-user at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user
More information about the Qgis-user
mailing list