Re: [Rpy] How can I get an index vector in rpy2, or if that doesn't exist, how can I select two columns?

2012-02-24 Thread Laurent Gautier
http://rpy.sourceforge.net/rpy2/doc-2.2/html/vector.html#extracting Best, L. On 2012-02-24 18:26, Niek de Klein wrote: Hi, I want to do the same thing as in the R example found here: http://www.r-tutor.com/r-introduction/data-frame/data-frame-column-slice. He makes use of the mtcars datas

[Rpy] How can I get an index vector in rpy2, or if that doesn't exist, how can I select two columns?

2012-02-24 Thread Niek de Klein
Hi, I want to do the same thing as in the R example found here: http://www.r-tutor.com/r-introduction/data-frame/data-frame-column-slice. He makes use of the mtcars datase which looks like this: mpg cyl disp hp drat wt ... Mazda RX4 21.0 6 160 110 3.90 2.62 ...

Re: [Rpy] How do use rgb/how to color histograms?

2012-02-24 Thread Thomas Kluyver
On 23 February 2012 18:28, Niek de Klein wrote: > > r['plot']( p1, col=r['rgb'](0,0,1,1/4), > xlim=R.vectors.IntVector([0,10]))  # first histogram > > r['plot']( p2, col=r['rgb'](1,0,0,1/4), > xlim=R.vectors.IntVector([0,10]), add=True)  # second > > > This gives the same overlapping histo

[Rpy] Adding columns to DataFrames

2012-02-24 Thread Luca Beltrame
Hello, in an effort to create a conversion between pandas objects[1] and R's data.frames, I'm trying to add columns to an empty DataFrame. Python code: from rpy2.robjects.packages import importr base = importr("base") my_row_names = empty = base.data_frame(row_names=[item for item in range(10

Re: [Rpy] Caught LookupError while rendering: 'show' not found on Apache with WSGI

2012-02-24 Thread Laurent Gautier
On 2012-02-23 21:30, Tony Tang wrote: > Everything works fine on development server. However, the following > error was showing when I moved the project to the production server > running httpd and wsgi. > > TemplateSyntaxError at / Caught LookupError while rendering: 'show' > not found Request M