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..? Thanks in advance Khushwant [[alternative HTML version deleted]]
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
On 02-Sep-10 07:16:54, 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..? > > Thanks in advance > KhushwantThe content you have listed above is part of a header from a PDF file, apparently generated by R from a plot() command ("R Graphics Output") presumably encapsulated between pdf(...) ... dev.off() commands. It is most unlikely that such a file would contain any "R code" (i.e. a list of C commands). Are you sure you are editing the correct file? What are you trying to do? In any case, there are almost no circumstances in which it is meaningful to apply a text editor (like 'vim') to a PDF file! Possibly, if you are using a Windows platform, you may have mixed up a text file with R commands (e.g. "project1.R") with a PDF file generated by R using the same name (e.g. "project1.pdf") because Windows (by default) does not show you the extension (respectively ".R" and ".pdf"). Please clarify! Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at manchester.ac.uk> Fax-to-email: +44 (0)870 094 0861 Date: 02-Sep-10 Time: 09:01:35 ------------------------------ XFMail ------------------------------