Skip to main content

re.search fails on mac

Posted in

the re.search function call in file rpy_tools.py line 105 is failing to extract the version number of R. here is the output. I have added print statements to check for the variables. version is coming out as None.

RHOME = /opt/local/lib/R
rexec = /opt/local/lib/R/bin/R
stat = 0
output = R version 2.12.0 (2010-10-15)
Copyright (C) 2010 The R Foundation for Statistical Computing
ISBN 3-900051-07-0

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License version 2.
For more information about these matters see
http://www.gnu.org/licenses/.

version = None

you will eventually have to

you will eventually have to move pass 2.9.2, so your version detection code should be able to detect double digits for minor and patch numbers.

Version Detection

That's true.

Red-R actually ships (in windows) with it's own version of R that is separate from others installed on the users machine. We control the version number from within Red-R so the version detection used by rpy is not employed.

But thanks for incrementing for us.

We will be using rpy2 in the next release which already has this improvement.

Kyle

Ok i'm going to wait till you

Ok i'm going to wait till you have made the necessary switch to rpy2 and then find bugs for mac only and report them. btw where is the bug tracker?

OK

OK sounds good.

here is the fix version =

here is the fix

version = re.search(" +([0-9]\.[0-9]*\.[0-9]*)", output)

now version is 2.12.0

R version 2.9.1

Because rpy was only built up to R 2.9.1 we have kept Red-R to that version. We are moving to rpy2 and incrementing the R version to 2.9.2.

Though versions are usually stable in R some functions have dramatic changes such as the changes in Bioconductor from 2.7 to 2.9 for normalization.

I would stick with Version 2.9.2 for Mac also at the moment so that widgets will still be compatible.

Kyle