Skip to Content.

mget-help - [mget-help] Error in calculating Diversity Index

Please Wait...

Subject: Marine Geospatial Ecology Tools (MGET) help

Text archives


[mget-help] Error in calculating Diversity Index


Chronological Thread 
  • From: Ana Mafalda Tomás Correia <>
  • To:
  • Subject: [mget-help] Error in calculating Diversity Index
  • Date: Thu, 7 Feb 2019 17:11:16 +0000
  • Authentication-results: mail-gw.oit.duke.edu; spf=pass ; dkim=pass header.d=gmail.com header.s=20161025; dmarc=pass header.from=gmail.com

Dear Nicholas,

I just installed the latest version of MGET (0.8a71) and I am trying to run the diversity tool. I tried all indexes but I am getting the same error every time:

"Executing: SpeciesDiversityCalculateDiversityIndexForArcGISPolygons grid_100km_tot_ef_er_sp "Simpson's index of diversity" simpsons sightings_db species group_size # #
Start Time: Thu Feb  7 17:09:55 2019
Running script SpeciesDiversityCalculateDiversityIndexForArcGISPolygons...
Intersecting the points with the polygons.
Summing species counts per polygon.
Reading species counts into memory.
Query complete: 0:00:01 elapsed, 990 rows retrieved, 0:00:00.001972 per row.
RPy_RException: Error in xtabs(Count ~ PolygonFID + SpeciesID, tmp1141112723) : 
  could not find function "xtabs"
Obtaining additional debugging information. This may cause this tool to hang. If you do not see any additional messages after one minute, halt its execution.
Failed script SpeciesDiversityCalculateDiversityIndexForArcGISPolygons...

Traceback (most recent call last):
  File "C:\Program Files\GeoEco\ArcGISToolbox\Scripts\SpeciesDiversityCalculateDiversityIndexForArcGISPolygons.py", line 5, in <module>
    ExecuteMethodFromCommandLineAsArcGISTool('GeoEco.SpatialAnalysis.Diversity', 'SpeciesDiversity', 'CalculateDiversityIndexForArcGISPolygons')
  File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\ArcGISScripts.py", line 210, in ExecuteMethodFromCommandLineAsArcGISTool
    exec sourceCode in globals(), locals()
  File "<string>", line 1, in <module>
  File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\SpatialAnalysis\Diversity.py", line 145, in CalculateDiversityIndexForArcGISPolygons
    result = r('diversity(xtabs(Count ~ PolygonFID + SpeciesID, %s), "%s")' % (dataFrameName, veganIndexName))
  File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\R.py", line 1094, in __call__
    value = self._Object(str(statements))
  File "C:\Python27\ArcGIS10.6\lib\site-packages\GeoEco\AssimilatedModules\rpy\rpy.py", line 339, in __call__
    return self.eval(self.parse(text=s))
RPy_RException: Error in xtabs(Count ~ PolygonFID + SpeciesID, tmp1141112723) : 
  could not find function "xtabs"


Failed to execute (SpeciesDiversityCalculateDiversityIndexForArcGISPolygons).
Failed at Thu Feb  7 17:10:13 2019 (Elapsed Time: 17,67 seconds)"

Is it something to do with my version of R (at the moment, x64 3.4.3)?

Thank you in advance.

Sincerely,
Mafalda

--

Ana Mafalda Correia

Bolseira Doutoramento / PhD Student



http://www.ciimar.up.pt/informatica/signature/signature1.png

 

CIIMAR | Interdisciplinary Centre of Marine and Environmental Research of the University of Porto

Terminal de Cruzeiros do Porto de Leixões

Avenida General Norton de Matos, S/N

4450-208 Matosinhos | Portugal | Tel. (+351) 223 401 805

E-mail:  | www.ciimar.up.pt | www.facebook.com/ciimar.up.pt

 

http://www.ciimar.up.pt/informatica/signature/signature2.jpg

 

Knowledge of the Ocean as a basis for the sustainable management and exploitation of resources

JPEG image

PNG image




Archive powered by MHonArc 2.6.19.

Top of Page