On 2011-12-08 13:21, Peter wrote:
> On Thu, Dec 8, 2011 at 9:50 AM, Marko Limbek<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/
> _______________________________________________
> rpy-list mailing list
> rpy-list@lists.sourceforge.net
> 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

Reply via email to