r.image(x,y,f,axes=FALSE)
> NameError: name 'FALSE' is not defined
>
> rpy.r.image(x,y,z) does only work without additional arguments. Does
> anyone know how I can code that in Python?
The problem is much simpler, FALSE is not defined in python (it is in
R). You just need to
> By the way,
>
> k = rpy.r.terrain.colors(100)
>
> fails. Is there trick to get access to the terrain.colors or to other R
> functions which have a dot (I don't know if there are many)?
Yes, as the rpy documentation explains, use an underscore instead:
k = rpy.r.ter
e as a python variable]
> Of course this works in R directly and a search of RPY info sources
> for paste func() with sep doesn't turn up anything useful.
It certainly looks like there is a bug here somewhere...
Peter
--
ch could
be merged in...
>From experience in other projects, a wiki worthwhile if you can get a
good sized group of people involved. Otherwise it can just get
spammed and cause more work.
Peter
-
Check out the new SourceF
d
for read.table() by experimenting in an R session, and then try the
same from rpy. This assumes you do not need the actual data in python
too.
I don't know if you can pass the file pointer (handle) from python to
R. I would be interested to know if this is possible.
Peter
On Tue, Apr 1, 2008
mer 2007, which gives a bad impression for
first time visitors.
Peter
-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Us
t know how the release process works, but it would make sense to
add a news entry when ever uploading a new release.
> I'd also like to point that "summer 2007" is not even one year old.
> That's not too bad.
Yeah - but it is close to a year old. The 1.0 release was p
See
http://www.warwick.ac.uk/go/peter_cock/r/ramachandran/ for a similar
example and also
http://www.warwick.ac.uk/go/peter_cock/python/ramachandran/drawing/
for a neat way to do this from python with rpy.
Peter
-
This SF.net email i
is now 1.0a0 (one-zero-alpha-zero).
Doesn't this risk confusion with the current rpy 1.x series? Wouldn't
it be a lot clearer if the version number of next_gen rpy aka rpy2
started with a 2?
Peter
-
Check out the ne
from the Sourceforge pages, and has only four
entries, covering the release of rpy 1.0.3, 0.4.6, 0.4.5 and 0.4.4.
I would disable the sourceforge news page (point it at the website if
possible) and and the release of rpy 1.0.3 to the main news page.
y simple statistics, then python should be fine. You may find the
numpy and scipy libraries helpful - they do include some statistical
code.
Peter
-
Check out the new SourceForge.net Marketplace.
It's the best place to
r.library("gplot")
>
> the error comes:"there is no package for gplot"
>
> How can I get the package?
As you are using windows, the easiest way would be to run the R GUI,
and install the gplot package via the menus. You can also go this
from the R command lin
pure python, which might be easier
depending on why you want to do this.
a = [1,2,3,4]
b = [x<3 for x in a]
Or using numpy,
a = numpy.array([1,2,3,4], numpy.int)
b = a < 3
Peter
-
This SF.Net email is sponsored by the Mobl
t; CMD
config --ldflags
returned
-F/Library/Frameworks/R.framework/.. -framework R
I have Python 2.5.2 and R version 2.7.0 (plus a working installation
of rpy 1.0.3).
Peter
-
This SF.Net email is sponsored by the Moblin Your M
ing -enable-werror --prefix=/usr --mandir=/share/man
--enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.0/
--with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib
--build=i686-apple-darwin9 --with-arch=apple --with-tune=generic
--host=i686-apple-darwin9 --ta
"foreign")
> r.library("stats")
> dat = r.read_dbf("D:/rTesting/myDataFile.dbf")
> #FIXME: can't get as_is =" FALSE" to work
In python, FALSE isn't defined as python uses False instead. Try:
dat = r.read_dbf("D:/rTesting/myDataFile.d
x27;dev.off']() is what you are looking for.
Does the rpy v1 style r.dev_off() still work in rpy v2? Personally I
much prefer this to r['dev.off']() for readability.
Peter
-
This SF.Net email is sponsored
t;>> dir(rpy2)
['__builtins__', '__doc__', '__file__', '__name__', '__path__']
Thanks
Peter
-
This SF.Net email is sponsored by the Moblin Your Move Developer'
Peter wrote:
>> Does the rpy v1 style r.dev_off() still work in rpy v2?
Laurent replied:
> Not directly. I have a sketchy attempt at making it possible (will be
> there for the 2.0 release, still scheduled for November), but it will
> not be the default.
>
>> Personally I
ent, could you show us how you would write this trivial plot
example (at the start of this thread) using rpy2.rpy_classic?
Thanks
Peter
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Buil
y what you mean by "The aim of rpy_classic is to have
rpy code running without (much) modification." Do you mean old rpy1
code, or something different?
I was making an assumption based on the name that the rpy_classic
module would provide "classic" (i.e. "old fashioned&qu
taf = ro.r['data.frame'](**d)
Hi Laurent,
You mentioned using rpy2.rlike.container.TaggedList and
rpy2.robjects.RDataFrame (new in rpy2) as a "safer" approach. Could
you show us how this example would work that way? Given how important
dataframes are in R, this discuss
right - simply switching existing debian/ubuntu packages
from rpy 1.x to rpy 2.x would be bad. As with other libraries etc,
just add new packages with rpy2 in the name for rpy 2.x instead, as
both can be installed together without pro
recently discussed on the mailing list and fixed.
Basically rpy2 is having trouble locating R. If you make sure the
folder where R.exe was installed is on the windows PATH environment
variable (via control panel, system, advanced, environment variables),
or setup th
recently discussed on the mailing list and fixed.
Basically rpy2 is having trouble locating R.
If you make sure the folder where R.exe was installed is on the
windows PATH environment variable (control
panel/system/advanced/environment
variables), or setup th
e rpy/rpy_tools.py for how to do this. I contributed
this code 3 years ago which is why I thought to check for rpy2 as well
(see rpy.py revision 186).
Peter
-
This SF.Net email is sponsored by the Moblin Your Move Develo
of R installed).
If I can find the time this week I'll try and test this out on my
Windows machine - but no promises. From memory the registry gives the
base folder, and you have to add the "bin" directory to get the full
path for the DLL.
Peter
P.S. I would change this error mes
imple R plotting
example to make a PS and PDF file, and see if those files work. That
should tell us if its an rpy problem or not.
Peter
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Bui
-wise (Fortran style)
arrays. Perhaps any numpy arrays using the Fortran convention could
be passed to/from R more efficiently?
Peter
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Buil
nt via the list is a URL,
https://lists.sourceforge.net/lists/listinfo/rpy-list
Go to this page, at the bottom is a form to unsubscribe.
Peter
-
This SF.Net email is sponsored by the Moblin Your Move Developer's chal
tware) for any version of python.
Peter
-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip
at is happening?
It looks like R_HOME has been detected as "C" rather than something
like "C:\Program Files\". This could be bug as there have been
some changes to this code recently. A few relevant questions:
Did you setup an R_HOME environment variable?
Is R on
ompilers... and I'm not
>> that good at this stuff: I am mostly a pure Python programmer :)
>
> I don't think that R for win32 is (was ?) compiled with MSVC, but with
> mingw32.
You may end up with R, python and your extensions compi
rompt, try "import win32api". If this works, it is
installed. If you get an ImportError, it is not. This module comes
as part of Mark Hammond's pywin32 package, see
http://sourceforge.net/projects/pywin32/
Peter
---
s" % R_HOME)
> RuntimeError: Unable to locate R.dll within C
This is the same error as before - which to me suggests a bug in how
rpy2 is using R_HOME. I suspect its something along the lines of a
bit of code expecting a list of all the R installations found (there
could be more than one) and
our graphs as a result. You will need to explicitly set the
graph captions, and then everything is fine.
Peter
--
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't
ll work or not.
Peter
--
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list
th distutils (bdist_wininst)
might help. I've tried, but so far haven't found anything.
Peter
--
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists
Did you install the developer headers etc for lapack and blas? I
don't know how things work on freebsd but on Linux often there will be
an lapack package plus an lapack-dev package which I think
l default to the MS compiler, try:
python setup.py build --compiler=mingw32
Or, create/edit the file distutils.cfg to make mingw32 the default
compiler for distutils.
Peter
--
This SF.net email is sponsored by:
SourcForge Co
you are talking about the python code, I would follow PEP8 and use
four space for indentation (and no tabs).
http://www.python.org/dev/peps/pep-0008/
For C code, well - I think Laurent it is up to you to set the
standard for
to run R directly, hoping it is on the path.
If you want to use this without changing the code try:
* Defining the RHOME environment variable
* Installing win32 http://starship.python.net/crew/mhammond/win32/ so
the registry can be checked
* Makin
s part of RPy 1.0.1 to deal with a
similar problem with loading the lapack library. I had a quick look
in SVN but couldn't work out what he actually changed in the code.
Peter
--
Open Source Business Conference (OSBC),
is on the mailing list for some
time, so thank you for the reminder!
It would be great if rpy and rpy2 could "clean up" after themselves.
Peter
--
Open Source Business Conference (OSBC), March 24-25, 2009, San
k on Windows, they plan a beta release this month and the current
plan is for the release to be in early April 2009. Of course, I don't
know if anyone has tested rpy2 with NumPy 1.3 yet...
Peter
--
Apps built with th
about:
Q: Now, how to extract data from the resulting objects ?
or,
Q: Now, how do we extract data from the resulting objects ?
and,
A: This depends on the type of R object.
or,
A: It depends on the type of R object.
Peter
en). In my own scripts I just
write the image to a PNG or PDF file and don't bother with the
graphics window.
Peter
--
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment
py2/doc/html/introduction.html#calling-r-functions
Plus this section doesn't mention R functions whose names are invalid in python:
http://rpy.sourceforge.net/rpy2/doc/html/robjects.html#robjects-functions
Peter
--
Crystal R
ot;) is not TRUE
>
> I any ideas how to get this working?
I suspect the problem is how you are trying to supply the formula (you
just used a string, "ys ~ x1s"). Read this:
http://www.warwick.ac.uk/go/peter_cock/python/lin_reg/#lm which should
help.
Peter
--
On 4/25/09, Ryan Banerjee-R wrote:
>
> Hi All
>
> Not sure about mailing list etiquette but I thought it would
> good to post a solution for others. Thanks for the quick help!
>
I think posting a working solution is excellent e
On 5/16/09, krysta Giles-Hansen wrote:
>
> from rpy import r
> import Numeric
Numeric is obsolete - does numpy work better here? I would expect it
to be more tested in rpy.
Peter
--
Crystal Reports - New Fre
hich is lossy), and then when you pass them back
to R they are re-converted into something not quite the same (probably
an array for some sort).
See:
http://rpy.sourceforge.net/rpy/doc/rpy_html/Conversion-system.html
Try something like this:
import rpy
rpy.set_default_mode(rpy.NO_CONVERSIO
t do what you hoped for.
This is equivalent to:
temp = r.as_matrix(erg)
r.is_matrix(temp)
With the default conversion, temp would be a python object.
Peter
--
OpenSolaris 2009.06 is a cutting edge operating system for enterpr
'utils', 'datasets',
'methods', 'base']
>>> rpy.r.attach("birthwt")
Traceback (most recent call last):
File "", line 1, in
rpy.RPy_RException: Error in function (what, pos = 2, name =
deparse(substitute(what)), warn.conflicts = TRUE)
can call the library function with a string
because R understands that. But, for attach, R does not expect a
string, just a symbol, hence the failure. I think I have learnt a
little more about R today :)
Thank you,
Peter
-
his:
import rpy
rpy.set_default_mode(rpy.NO_CONVERSION)
#your code here:
rpy.r.library("Rdbi")
rpy.r.library("RdbiPgSQL")
rpy.r.dbConnect(rpy.r.PgSQL(),host="localhost", dbname="simpop",
user="postgres", password="postgres&q
> python(2.5) from anywhere.
That installer is for 32 bit Windows (you can tell this from the win32
bit in the filename).
You need a 64bit installer! These have amd64 in the filename instead
(and will work on Intel's 64
On Sat, Jul 18, 2009 at 5:35 PM, Milton Cezar
Ribeiro wrote:
> Hi Peter,
>
> Thanks for your help.
> I must confess that I tryed to find the right link (with amd64 on the
> filename) without luck up to now. If anyone know what is the link, please,
> let me know.
There are
type (e.g. signed versus unsigned, or the precision)
I would try making an explicit copy of x to rule some of these issues.
Peter
--
___
rpy-list mailing list
king a copy of the NumPy array
which should give you a continuous C ordered array which owns its
own memory.
Peter
--
___
rpy-list mailing list
rpy-list@lis
d")
>
> The .png file is created but it is empty.
You need to also close the output device, using dev.off() in R. Try:
r.dev_off()
at the end of your script.
Peter
--
Let Crystal Reports handle the reporting -
ython syntax. Also for calling
functions in Python use round brackets, square brackets (generally)
are for indexing.
Peter
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify y
x27;method'") is completely greek to
> me.
In Python, the dot means access a method/property of an object.
In R, a dot is just another character in a variable or function name.
Thus rpy maps "_" to "." to allow simple access to these otherwise
invalid R names from within
be
interested to see the benchmarks for the different approaches.
Peter
--
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
simple, predictable, correct in vastly more cases than doing
> no conversion, and for the occasional weird edge-case you can still
> use rcall just like now (only the weird edge-cases are much rarer).
>
> -- Nathaniel
This is like the simple "." to "_" mapping in rpy1, very s
thing like check if example_name is a valid argument
for the function at run time, and if not, check example.name instead?
Would this impose too high a performance cost?
I agree this won't cover the special case of a function which has
two arguments which differ only in underscore vs dot,
On Wed, Sep 30, 2009 at 4:59 PM, Laurent Gautier wrote:
>
> Peter wrote:
>>
>> Can you do something like check if example_name is a valid argument
>> for the function at run time, and if not, check example.name instead?
>> Would this impose too high a performance
/bin
Just a guess, but try spelling out your home directory
in full (not just a tilde).
Peter
--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this
On Mon, Oct 5, 2009 at 3:53 PM, Nick Schurch wrote:
>
> Thanks for the answer peter, but I'm still having an issue...
>
> When I try:
>
> result<-r.pvclust(data=data, method_hclust="complete",
> method_dist="correlation", nboot=1, init_ran
ample in full - complete examples are very useful
when asking for help :)
Regards,
Peter
--
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year.
I used to just write directly to a PDF or PNG file, which bypasses
the whole dynamic popup windows thing and the complications it brings.
Note in rpy you'll need to use dev_off to access the dev.off function in R.
Peter
---
h call
> would have). Moreover the caching is safe, as it will throw an exception in
> the function has a signature that cannot be translated safely.
>
> http://rpy.sourceforge.net/rpy2/doc-dev/html/robjects.html#functions
That sounds great :)
Peter
--
gits minor version number (R is now 2.10).
> http://www.mail-archive.com/rpy-list@lists.sourceforge.net/msg02262.html
>
> HTH,
>
> L.
It sounds like it would be a good idea to do another rpy1 point release
k:
r("results$hclust$labels = seq(1,50)")
or
r("results$hclust$labels <- seq(1,50)")
This assumes the variable "results" existing in the R name space (and
not just in the Python namespace). You may need to assign it first,
rpy.r.assign("results",
argument names, so this mapping isn't
100% safe.
I expect an rpy2 expert will clarify how you are intended to
do this, otherwise consult the docs.
Peter
--
Let Crystal Reports handle the reporting - Free Crystal Repo
2.3, 1.7, 3.7]
...
r.plot(x,y,ylim=(-30,30), xlim=(1,5))
Should this be:
p = [11.3, -0.7, -17.6, -6.7, -3.0, -17.6, -6.2, 24.0, 25.9, -26.3,
-19.3, -4.9, 5.5, -11.6, 6.6, -17.8]
t= [2.2, 2.4, 2.5, 1.7, 2.6, 2.8, 2.0, 2.9, 3.4, 3.7, 3.2, 3.2, 1.8,
2.3, 1.7, 3.7]
...
r.plot(t,p,ylim=(-30,30),
y 1, and
means you can have both installed at the same time.
Peter
--
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14
o do is manually remove these files (rpy.py,
py_wintools.py, rpy_version.py, rpy_tools.py, rpy_io.py, plus the
corresponding *.pyc files, and depending on what version of
Python you have there could also be an rpy-XXX.egg file).
Peter
sourceforge.net/tracker/?func=detail&atid=453021&aid=2940558&group_id=48422
These days rpy1 doesn't get so much attention (almost
all work is on rpy2 now), but I think it would be nice to
have another point release to include this fix for supporting
recent versions of R. There a
On Sat, Feb 6, 2010 at 7:46 AM, Laurent Gautier wrote:
>
> On 2/6/10 12:26 AM, Peter wrote:
>>
>> I recall seeing a bug report and fix to cope with the two digit
>> minor release number (the 10 in 2.10.1), try this:
>>
>> https://sourceforge.net/tracker/
;)
> shapiro = robjects.r('shapiro.test')
As noted above, rpy2 does things differently. There are good reasons
for this (e.g. R now allows both dot and underscore in argument names,
while historically it did not allow dots).
Regards,
Peter
the numbers changed. They
> are totally different. I wonder whether there is any way to solve my problem
> or it is impossible??
>
> Zahra.
Can you construct a (small) self contained example to show the issue?
Peter
--
of output,
furthermore it doesn't like you are comparing like with like.
What I was hoping you would show was a short R script
(maybe using one of the many built in datasets), with
its output, and your translation into python with rpy2
and
oring a GSoC project combining (Bio)python and
rpy2 for accessing R phylogenetic tools from Python:
http://biopython.org/wiki/Google_Summer_of_Code
Peter
--
Download Intel® Parallel Studio Eval
Try the new software tools
o
What command would you use in R, or are you new to R as well?
Peter
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applicatio
here are online tutorials and
several good books) before trying to use rpy or rpy2.
Peter
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, an
ons of R? That was quite a useful feature since R releases
are so frequent that not everyone will be using the same one.
If not, would people just want to use the latest R release?
Peter
--
Download Intel® Parallel Studio Ev
-2.9.2 and
R-2.8.2. Just in case it was the problem, I edited my PATH again to
remove C:\cygwin\bin\;C:\cygwin\usr\bin\; and retried, but R acts the
same way.
However, ignoring that, it claims my R installs were not built as libraries (?).
I wonder if this is a Windows specific bug in the config
On Mon, Apr 12, 2010 at 7:20 PM, Laurent Gautier wrote:
>
> On 4/12/10 7:46 PM, Peter wrote:
>>
>> Hi Laurent,
>>
>> Apologies if this is a bit curt/blunt - I'm running late and just
>> squeezed in an attempt to build rpy2 (from the zip file for 2.1.0rc)
sing in the distributed tarball. Was that an oversight, or is it
> correct?
>
> Thanks.
Oh - something specific for Sean Davis' GEOquery module in BioConductor?
http://www.bioconductor.org/packages/2.6/bioc/html/GEOquery.html
Sounds useful for those doing (re)
On Mon, Apr 12, 2010 at 7:33 PM, Peter wrote:
>
> Any idea how calling "R CMD config --cppflags" behaved? That seems to
> be the stumbling block at the moment and has nothing to do with Python
> or the compiler for rpy2. It could be something funny on my machine...
>
I
ryfunc) NA_unaryfunc, /* nb_absolute; */
(inquiry) NA_nonzero, /* nb_nonzero; /* Used by PyObject_IsTrue */
(unaryfunc) NA_unaryfunc, /* nb_invert; */
(binaryfunc) NA_binaryfunc, /* nb_lshift; */
Peter
--
Download In
On Wed, Apr 14, 2010 at 5:14 PM, Peter wrote:
>
> There is no Rinterface.h file under C:\Program
> Files\R\R-2.10.1\include (nor C:\Program Files\R\R-2.9.2\include or
> C:\Program Files\R\R-2.8.1\include either).
>
I thought this seemed familiar - Laurent Oget had the same issue
On Wed, Apr 14, 2010 at 5:24 PM, Peter wrote:
> On Wed, Apr 14, 2010 at 5:14 PM, Peter wrote:
>>
>> There is no Rinterface.h file under C:\Program
>> Files\R\R-2.10.1\include (nor C:\Program Files\R\R-2.9.2\include or
>> C:\Program Files\R\R-2.8.1\include either).
&
On Wed, Apr 14, 2010 at 5:40 PM, Peter wrote:
> On Wed, Apr 14, 2010 at 5:24 PM, Peter wrote:
>> On Wed, Apr 14, 2010 at 5:14 PM, Peter
>> wrote:
>>>
>>> There is no Rinterface.h file under C:\Program
>>> Files\R\R-2.10.1\include (nor C:\Program Files
velopment toolkit (mingw and some unix tools). Check
> the R FAQ for Windows.
You're right. I'd resolved this, I was missing make. With that installed
via cygwin doing "R CMD config --cppflags" and related calls works fine.
I sent some follow up emails about the next proble
of
> `R --version'. Does anyone know how to fix it?
What does running 'R --version' at the Windows command prompt do?
Peter
--
___
rpy-list mailin
in
my emails of 14 April? (Thread title "Windows installer for 2.1rc?").
Peter
--
___
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list
week :(
Hopefully next week... I hope the mingw32 output will be helpful,
I remember the error messages being noticeably different.
Regards,
Peter
--
___
rpy-list mailing li
below). Does anyone have any idea on what is
>> going on?
>>
>> Thanks,
>>
>> Fong
>> ...
>> Exception: "/home/fong/R-2.11.1/bin/R" CMD config --cppflags
>> returned
What happens i
1 - 100 of 162 matches
Mail list logo