0

I have installed pyreadr and would like to use it to read .RData. I have followed the direction given from the previous comment on here Loading RData but that did not work for me.

When I try the following line (with the path pointing to the right file):

result = pyreadr.read_r('/path/to/file.RData')

I get this error:

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/apps/bioapps/python/Python-3.6.1/lib/python3.6/site-packages/pyreadr/pyreadr.py", 
line 80, in list_objects
parser.parse(path)
File "pyreadr/librdata.pyx", line 117, in pyreadr.librdata.Parser.parse
File "pyreadr/librdata.pyx", line 142, in pyreadr.librdata.Parser.parse
pyreadr.custom_errors.LibrdataError: Unable to read from file

Please let me know if you have any suggestions.

Thanks!

sal_x_sal
  • 75
  • 1
  • 2
  • 7
  • Does it work when you try the other answer (not pyreadr)? Are you 100% that the input file is okay? – Jongware May 04 '20 at 22:07
  • 1
    You mean rpy2.robjects? If so, no I haven't tried. I clicked on the link that was given for the documentation and it never opened so I was a bit more inclined toward pyreadr. – sal_x_sal May 04 '20 at 22:15

0 Answers0