[R] R code changes to crap

peter dalgaard pdalgd at gmail.com
Thu Sep 2 09:38:45 CEST 2010


On Sep 2, 2010, at 09:16 , khush ........ wrote:

> Hi,
> 
> I am using vim to edit my files...I do not know what has been pressed by me
> as my R code get converted to such a crap...
> 
> %PDF-1.4
> %<81>â<81>ã<81>Ï<81>Ó\r
> 1 0 obj
> <<
> /CreationDate (D:20100902122215)
> /ModDate (D:20100902122215)
> /Title (R Graphics Output)
> /Producer (R 2.11.1)
> /Creator (R)
> 
> how to reconvert it to the my actual code?? as I do not have  backup for
> it..?
> 

Well, that's a PDF file, with some R Graphics inside, so presumably you did pdf(file="foo.R") or copied the graphics output as PDF to foo.R using the user-friendly interface to shooting yourself in the foot.

Depending on your (unstated) platform and configuration, VIM may be leaving .bak files around, which you can use, or you may have the commands echoed into an output scriptfile, from which you can extract them. Otherwise, I suspect that you are out of luck.


-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list