Dear All, I suspect this is kind of dumb, but when I was under the thrall of the dark lord (read, using a W2K box), all my work in R files came out as foo.RData. I moved on to GNU/Linux, and all the old .RData files keep on working as they used. No problems in loading and stuff. But I use R from the terminal. Assuming I decide to switch to emacs, do I need to save my work as foo.r? what about my old files? shall I simply "mv" them to foo.r? all in all, foo.Rdata and foo.r, does it make any difference? Regards, Federico -- ================================ Federico C. F. Calboli Department of Biology University College London Darwin Building Gower Street London WC1E 6BT tel: 020 7679 4395 fax: 020 7679 7096 f.calboli at ucl.ac.uk
Federico Calboli <f.calboli at ucl.ac.uk> writes:> Dear All, > > I suspect this is kind of dumb, but when I was under the thrall of the > dark lord (read, using a W2K box), all my work in R files came out as > foo.RData. I moved on to GNU/Linux, and all the old .RData files keep on > working as they used. No problems in loading and stuff. But I use R from > the terminal. Assuming I decide to switch to emacs, do I need to save my > work as foo.r? what about my old files? shall I simply "mv" them to > foo.r? all in all, foo.Rdata and foo.r, does it make any difference?Nonono... foo.r (or foo.R) is for R *source* code, functions, scripts, and such. .RData files work exactly as always. -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
*.R is for the script file and is ASCII type. *.Rdata (or sometimes *.rda) is the usual extension for R data and contains binary information. If you try to cat a *.Rdata file, you will end up with gibberish as it is binary. Try opening *.Rdata with emacs if you can. Emacs will recognise it as a fundamental type and not as an ESS type. There might be ways to associate Rdata files with ESS. But other people might not consider reading your "*.Rdata" files. -- Adaikalavan Ramasamy -----Original Message----- From: Federico Calboli [mailto:f.calboli at ucl.ac.uk] Sent: Friday, October 03, 2003 7:40 PM To: r-help at stat.math.ethz.ch Subject: [R] foo.RData or foo.r? Dear All, I suspect this is kind of dumb, but when I was under the thrall of the dark lord (read, using a W2K box), all my work in R files came out as foo.RData. I moved on to GNU/Linux, and all the old .RData files keep on working as they used. No problems in loading and stuff. But I use R from the terminal. Assuming I decide to switch to emacs, do I need to save my work as foo.r? what about my old files? shall I simply "mv" them to foo.r? all in all, foo.Rdata and foo.r, does it make any difference? Regards, Federico -- ================================ Federico C. F. Calboli Department of Biology University College London Darwin Building Gower Street London WC1E 6BT tel: 020 7679 4395 fax: 020 7679 7096 f.calboli at ucl.ac.uk ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
On Fri, 2003-10-03 at 13:16, Adaikalavan RAMASAMY wrote:> *.R is for the script file and is ASCII type. > *.Rdata (or sometimes *.rda) is the usual extension for R data and > contains binary information. > > If you try to cat a *.Rdata file, you will end up with gibberish as it > is binary. > > Try opening *.Rdata with emacs if you can. Emacs will recognise it as a > fundamental type and not as an ESS type. There might be ways to > associate Rdata files with ESS. But other people might not consider > reading your "*.Rdata" files. >I dunno about this, but if I open R under emacs first and then I load my foo.RData, it loads fine. Mind you, I am totally new to emacs, I even had to install ESS from RPM, as I could not figure out how to do it from source... Cheers, Federico -- ================================ Federico C. F. Calboli Department of Biology University College London Darwin Building Gower Street London WC1E 6BT tel: 020 7679 4395 fax: 020 7679 7096 f.calboli at ucl.ac.uk
Dear All, thanks for your clarifications. When I said that my .RData files load fines, I should have added that the files are images that contain objetcs, not code. In the bad ol' days under the thrall of the dark ruler (W2K), I would write all my code in text files, saved as foo.txt, and then copy the code with cut 'n' paste when needed... sins of a reckless youth, I daresay, but now I am older and wiser, and I'll start saving my code as .R files. Cheers, Federico -- ================================ Federico C. F. Calboli Department of Biology University College London Darwin Building Gower Street London WC1E 6BT tel: 020 7679 4395 fax: 020 7679 7096 f.calboli at ucl.ac.uk