Hi thanks for the advices,
I tried with rpy2 and i got some results executing the r-code through:

robjects.r([code])

but the data structure are not clear and is not straightforward 
understand if the result would be the same in R.
I'll keep trying...
Anyway I think that the integration between python and R is possible 
only if you need a bit of one into the other...an I wrong?
Is there some one who has developed large projects integrating both?
Regards,
Filippo

On 28/08/12 13:25, Mike Sarahan wrote:
> Sorry, I can't help you any further.  Might I suggest RPy2 as an
> alternative?  It seems to be much more active in development, and
> advantageous in using things like numpy.
>
> On Tue, Aug 28, 2012 at 5:16 AM, Filippo Monari <ingf...@gmail.com> wrote:
>> rpy
>>
>> On 28/08/12 13:14, Mike Sarahan wrote:
>>> OK, rpy or rpy2?
>>>
>>> On Tue, Aug 28, 2012 at 5:06 AM, Filippo Monari <ingf...@gmail.com> wrote:
>>>> Hi thank you for the answer,
>>>>
>>>> r.tell(morris, y=output['V1'])
>>>>
>>>> well, my morris object in python is a dictionary.
>>>> The model output is dictionary too, but the data set I send to morris is
>>>> a list...
>>>> In R it y needs a vector, but reading the documentation of rpy...vectors
>>>> are represented as lists or dictionaries.
>>>> I tried with a tuple, array...I keep getting the list error or:
>>>>
>>>> RPy_RException: Error in UseMethod("tell") :
>>>>      no applicable method for 'tell' applied to an object of class
>>>> "c('double', 'numeric')"
>>>>
>>>> Could it be possible that the particular method 'tell' is not supported?
>>>> Regards,
>>>> Filippo
>>>>
>>>> On 28/08/12 12:44, Mike Sarahan wrote:
>>>>> Are you using the brackets in the set of parameters for the morris 
>>>>> function?
>>>>>
>>>>> I think the debug message is telling you that you can't use brackets
>>>>> in the tell function for the y=[] part.  Brackets in Python are lists.
>>>>>     Alternatively, maybe M in your example is a list?  Either way, it
>>>>> looks like you need to pass some other data structure than a list to
>>>>> the tell function.  Sorry I'm not familiar enough with this to give
>>>>> you a proper example, but hopefully this gets you started.
>>>>>
>>>>> Best,
>>>>> Mike
>>>>>
>>>>> On Tue, Aug 28, 2012 at 4:37 AM, Filippo Monari <ingf...@gmail.com> wrote:
>>>>>> Hi every body,
>>>>>> I'm trying to use rpy to realize a python script able to perform the
>>>>>> Morris Method on a set of data.
>>>>>> I'm having a problem in using the 'tell' method.
>>>>>>
>>>>>> In R I proceed in this way:
>>>>>> #morris object
>>>>>> M=morris([set of parameters])
>>>>>> #extract the input for the model and perform the simulation
>>>>>> #go back to R
>>>>>> #tell to the morris object the output of the model
>>>>>> tell(M, y=[model output])
>>>>>>
>>>>>> In python I can't perform the last step:
>>>>>> r.tell(M, y=[model output])
>>>>>> RPy_RException: Error in UseMethod("tell") :
>>>>>>       no applicable method for 'tell' applied to an object of class 
>>>>>> "list"
>>>>>>
>>>>>> I tried several things but without success.
>>>>>> Please can anyone give me and advice?
>>>>>> Regards,
>>>>>> Filippo Monari
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Live Security Virtual Conference
>>>>>> Exclusive live event will cover all the ways today's security and
>>>>>> threat landscape has changed and how IT managers can respond. Discussions
>>>>>> will include endpoint security, mobile security and the latest in malware
>>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>>>> _______________________________________________
>>>>>> rpy-list mailing list
>>>>>> rpy-list@lists.sourceforge.net
>>>>>> https://lists.sourceforge.net/lists/listinfo/rpy-list
>>>>> ------------------------------------------------------------------------------
>>>>> Live Security Virtual Conference
>>>>> Exclusive live event will cover all the ways today's security and
>>>>> threat landscape has changed and how IT managers can respond. Discussions
>>>>> will include endpoint security, mobile security and the latest in malware
>>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>>> _______________________________________________
>>>>> rpy-list mailing list
>>>>> rpy-list@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/rpy-list
>>>> ------------------------------------------------------------------------------
>>>> Live Security Virtual Conference
>>>> Exclusive live event will cover all the ways today's security and
>>>> threat landscape has changed and how IT managers can respond. Discussions
>>>> will include endpoint security, mobile security and the latest in malware
>>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>>> _______________________________________________
>>>> rpy-list mailing list
>>>> rpy-list@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/rpy-list
>>> ------------------------------------------------------------------------------
>>> Live Security Virtual Conference
>>> Exclusive live event will cover all the ways today's security and
>>> threat landscape has changed and how IT managers can respond. Discussions
>>> will include endpoint security, mobile security and the latest in malware
>>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>>> _______________________________________________
>>> rpy-list mailing list
>>> rpy-list@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/rpy-list
>>
>> ------------------------------------------------------------------------------
>> Live Security Virtual Conference
>> Exclusive live event will cover all the ways today's security and
>> threat landscape has changed and how IT managers can respond. Discussions
>> will include endpoint security, mobile security and the latest in malware
>> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
>> _______________________________________________
>> rpy-list mailing list
>> rpy-list@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rpy-list
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rpy-list


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list

Reply via email to