Laurent, It is the last line of the example which is the vegdist function. I did find on a smaller input matrix it works fines. I mucked around with it a little more last night and I narrowed it down to somewhere in the last 354 rows (total 2854 rows x 11 cols) of the input matrix. I don't see any errors in these rows so I wonder if it could be a memory issue. Right now it's running on a XP machine, I'll move it over to a Linux machine and see if it has the same issue.
BTW, I looked a little at rpy2, but the whole rpy thing is new to me and couldn't seem to get rpy2 to work. In the rpy tool I set "from rpy import r", but if I try "from rpy2 import r" I get the and error "ImportError: cannot import name r". I've looked around for a manual for rpy2, but everything I find is for rpy. Is there anything more directed to rpy2? Thanks for the reply, Jon -----Original Message----- From: Laurent Gautier [mailto:lgaut...@gmail.com] Sent: Thursday, September 24, 2009 11:59 PM To: Jon Hak Cc: RPy help, support and design discussion list Subject: Re: [Rpy] r call stalls in Pytonwin Jon, It is not clear to me where the call hangs. Is it at the last line of your example ? Is it somewhere earlier ? Also, making the example a standalone one (i.e., not relying on third-party data no one else than you has) may increase the chances of having others find what is happening. Best, L. PS: In the last year people working on ArcGIS plugins also looked at rpy2 as an option. Jon Hak wrote: > When I try to run a dissimilarity analysis using the vegan library in > Pythonwin calling to R I seem to get into a situation that I can only > describe as stalling without any error generated. I can run the exact > process in R directly and it runs fine, and I would like to set this up > as a tool from ArcGIS. > > > > This is a pretty simply process, below is the example scripting. When I > run the process from Pythonwin it makes it to the last line in then just > processes, I've let it run over 6 hrs and there seems to be no progress, > but the cpu and ram and being actively utilized. If I run it directly > from R it's done in a less than a minute. > > > > import rpy, win32com.client, numpy > > from rpy import r > > r('library(vegan)') > > r('csv <- read.csv("c:/Projects/Brazil/Analysis/CSV_Crosstab.csv", > header=T, as.is=T)') > > r('dim(csv)') > > r('names(csv)') > > r('csv.data <- csv[,c(-1)]') > > r('csv.m <- as.matrix(csv.data,)') > > r('dimnames(csv.m) <- list(csv$site_id, names(csv.data))') > > r('csv.dis <- vegdist(csv.m, method="jaccard")') > > > > Any help would be appreciated, without an error I'm at a loss as to what > to try to trouble shoot. > > > > Thanks, > > > > Jon > > *********************************************************** > > John Hak > > Senior GIS Analyst/Ecologist > > /NatureServe - A Network Connecting Science with Conservation/ > > 4001 Discovery Drive, Suite 2110 > > Boulder, CO 80303 > > (703) 797-4809 > > Skype: jon.hak > > ΓΌ Please consider the environment before printing this e-mail > > > > > > > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > > > ------------------------------------------------------------------------ > > _______________________________________________ > rpy-list mailing list > rpy-list@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/rpy-list ------------------------------------------------------------------------------ Come build with us! The BlackBerry® Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9-12, 2009. Register now! http://p.sf.net/sfu/devconf _______________________________________________ rpy-list mailing list rpy-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rpy-list