I am using Python 2.6.4, I need it for my architecture ( python 2.6.4 +
pywin32-216 + rpy1.0.3 + numpy1.6.1 + R2.9.0 + SPSS19.00 )
I am a mathematician with not so strong programming background (I am more
sociological analytical oriented) and I got thrown into python ocean, I try
not to drown
So should I go for RPy2 and spend at least a week learning it or should I
import OrderedDict, as Federico ( http://pypi.python.org/pypi/ordereddict)
and Thomas (
http://docs.python.org/library/collections#collections.OrderedDict)
suggested? I will probably use python for some more tasks in the future.
When I try to import OrderedDict I get this error. I am afraid I cannot
import it with my python version. Is that true?
>>> import collections
>>> from collections import OrderedDict
Traceback (most recent call last):
File "<interactive input>", line 1, in <module>
ImportError: cannot import name OrderedDict
best
Marko
On Thu, Dec 8, 2011 at 7:25 PM, Laurent Gautier <lgaut...@gmail.com> wrote:
> On 2011-12-08 13:21, Peter wrote:
>
>> On Thu, Dec 8, 2011 at 9:50 AM, Marko
>> Limbek<marko.limbek@valicon.**net<marko.lim...@valicon.net>>
>> wrote:
>>
>>> Hello Peter,
>>>
>>> I enclose R code, Python code (for_peter, nominalise) and data.
>>> these outputs of 'factanal' in R and PYTHON should be the same,
>>> but are slightly different.
>>>
>>> ...
>>>
>> The last line of the Python script is this:
>>
>> print(data.keys())
>>
>> That is printing the keys of a dictionary, which as discussed
>> will be in arbitrary order. You know the scores, and you have
>> produced a list of the names sorted by score, and selected
>> the top 15 entries, so why not use that? i.e. Something like
>> this (untested since I don't have all the libraries installed):
>>
>> for x in top15:
>> print x, data[x]
>>
>> Perhaps the deeper question is one about rpy's data conversion,
>> and if it could use an order-preserving dictionary subclass,
>> rather than the default Python order-free dictionary?
>>
> Flogging a dead horse. ;-)
> Conversion to a dict-like should not be done because it can't reliably be
> done in the first place.
>
>
> However,
>> rpy v1 is not being developed further so you might be better
>> off exploring how rpy2 handles this.
>>
>
> With rpy2, "data.names" would be all one needs to list the names in a list
>
>
>
>> Peter
>>
>> ------------------------------**------------------------------**
>> ------------------
>> Cloud Services Checklist: Pricing and Packaging Optimization
>> This white paper is intended to serve as a reference, checklist and point
>> of
>> discussion for anyone considering optimizing the pricing and packaging
>> model
>> of a cloud services business. Read Now!
>> http://www.accelacomm.com/jaw/**sfnl/114/51491232/<http://www.accelacomm.com/jaw/sfnl/114/51491232/>
>> ______________________________**_________________
>> rpy-list mailing list
>> rpy-list@lists.sourceforge.net
>> https://lists.sourceforge.net/**lists/listinfo/rpy-list<https://lists.sourceforge.net/lists/listinfo/rpy-list>
>>
>
>
------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of
discussion for anyone considering optimizing the pricing and packaging model
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
rpy-list mailing list
rpy-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rpy-list