Hi Andrew,

Thanks for reporting your issues with the documentation.

For the first one, I'd think that there is a typo and one should
read:
from rpy2.robjects import NA_Real

For the second one, the code base changed and the documentation did (for rpy2-2.3, I am slowing moving toward have the documentation check against the code thanks to the nice features in Sphinx). There are plenty of code paths not yet covered by unit tests, please do not hesitate to use the bug tracker on bitbucket.

In the meantime, one way to achieve this is:
m.rx[{'i': row_i, 'j': col_i}] = row_i + col_i * 100

Best,

Laurent

On 2012-07-16 07:30, Andrew Mittleider wrote:
Hello all,

I believe there are two documentation errors with regards to this link: http://rpy.sourceforge.net/rpy2/doc-2.2/html/introduction.html#r-vectors .

The first error is with the import statements. They should be rearranged to the following:

from rpy2.robjects.packages import importr
from rpy2.rlike.container import TaggedList
from rpy2.robjects import NA_real

otherwise it results in the error "cannot import name NA_real".


The second error is with the line:

m.rx[TaggedList((row_i, ), (col_i, ))] = row_i + col_i * 100

The error that results from this line is: "TypeError: All keywords must be strings (or None)." Unfortunately, I don't know how to fix this error. I am new to R and rpy2, so if you have a solution to this problem please let me know.

Thanks,
Andrew


------------------------------------------------------------------------------
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