Re: [Rpy] ImportError: libR.so: cannot open shared object file: No suchfile or directory

2011-03-08 Thread Denham Robert
don't add the library, just the path to it: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/lib/R/lib/ Robert From: David Montgomery [mailto:dmontgom...@brandscreen.com] Sent: Wednesday, 9 March 2011 3:46 PM To: Denham R

Re: [Rpy] ImportError: libR.so: cannot open shared object file: No suchfile or directory

2011-03-08 Thread Denham Robert
I think the third option is likely to be the simplest for you. First off, find where libR.so actually is. Its probably somewhere like /usr/lib/R/lib/ but at the comand line you can type R RHOME to see the base of this path. At home under ubuntu, mine is in /usr/lib/R/lib/ and at work it is in /op

Re: [Rpy] specify xlim for hist()

2010-11-03 Thread Denham Robert
I had a look at this, and hist did some very weird things for me in rpy2, plotted a lot of numbers over the top of the histogram. I had better luck with histogram from the package lattice. I was wondering, do you want a histogram of the values in d that fall between 200 and 2000? If so, you proba

Re: [Rpy] converting r array to numpy array

2010-11-02 Thread Denham Robert
-Original Message- From: Laurent Gautier [mailto:lgaut...@gmail.com] Sent: Tuesday, 2 November 2010 4:49 PM To: Denham Robert Cc: RPy help, support and design discussion list Subject: Re: [Rpy] converting r array to numpy array This is a bug then. The problem is in the way strides are compu

Re: [Rpy] converting r array to numpy array

2010-11-01 Thread Denham Robert
39 48] [ 4 13 22 31 40 49] [ 5 14 23 32 41 50] [ 6 15 24 33 42 51] [ 7 16 25 34 43 52] [ 8 17 26 35 44 53]] Regards, Robert -Original Message- From: Laurent Gautier [mailto:lgaut...@gmail.com] Sent: Monday, 1 November 2010 4:58 PM To: Denham Robert Cc: RPy help, support and des

[Rpy] converting r array to numpy array

2010-10-31 Thread Denham Robert
I got caught out converting a 3d array in R to a numpy array. I did something like: import numpy import rpy2 import rpy2.robjects as robjects marr = robjects.r.array(robjects.IntVector(range(54)),dim= robjects.IntVector([9,2,3])) marrpy = numpy.array(marr) print marrpy.flatten() print robjects.r[

Re: [Rpy] rpy2 memory leak

2009-04-22 Thread Denham Robert
I know this was raised before, and I saw a suggestion that using gc.collect seemed to fix things, but I am getting I think a memory leak in rpy2 which doesn't seem to occur in rpy. This could be how I am coding things of course. Here is an example: import rpy2.robjects as robjects from numpy impor

[Rpy] rpy2 rpy_classic

2008-10-27 Thread Denham Robert
I am having problems with rp2.rpy_classic with conversions. If I do: $ python Python 2.5.2 (r252:60911, Aug 20 2008, 17:14:32) [GCC 4.1.2 20070115 (prerelease) (SUSE Linux)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from rpy2.rpy_classic import * >>>