I'm trying to use ESS & xemacs under debian linux testing and KDE. My problem is that I didn't find any document in the internet explaining a **step by step** session with R and xemacs. The (wrong) procedure I follow (to no avail!) is: 1) I start R in a terminal window; 2) I start xemacs and open a file with the extension .R (test.R); 3) I issue M-x R RET and I can see an Rd new item in the menu; And WHAT NEXT? I mean if I want to start an R interactive session under xemacs what should I do? And, to record the session? Please help. Ciao from Rome, Italy Vittorio
On Sun, 7 Dec 2003 08:38:17 +0100 "v\.demart\@libero\.it" <v.demart at libero.it> wrote:> I'm trying to use ESS & xemacs under debian linux testing and KDE. > > My problem is that I didn't find any document in the internet explaining a > **step by step** session with R and xemacs. > > The (wrong) procedure I follow (to no avail!) is: > 1) I start R in a terminal window; > 2) I start xemacs and open a file with the extension .R (test.R); > 3) I issue M-x R RET and I can see an Rd new item in the menu;Just do 1) start xemacs 2) M-x R RET If ESS is installed correctly, you now find the R command prompt inside your xemacs.> > And WHAT NEXT? > > I mean if I want to start an R interactive session under xemacs what should I do? > And, to record the session? > > Please help. > > Ciao from Rome, Italy > > Vittorio > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help >-- "Die herrschenden Ideen sind die Ideen der Herrschenden." --- K. Marx Detlef Steuer --- http://fawn.unibw-hamburg.de/steuer.html ***** Encrypted mail preferred *****
On 12/07/03 08:38, v.demart at libero.it wrote:>I'm trying to use ESS & xemacs under debian linux testing and KDE. > >My problem is that I didn't find any document in the internet explaining a >**step by step** session with R and xemacs.Here is how I do it. (I admit that it is much easier to tell you this than to find out where I learned it.) 1. Start Xemacs. (I do this about once a day and keep it in one viewport. I don't know if KDE has viewports the way that Metacity does under Gnome.) 2. In Xemacs, give the command M-x R (which for me is alt-x R). This starts R as a function in Xemacs. It prompts for a directory and I answer the prompt question with wherever the relevant .R file is. 3. In another viewport (or window, or whatever), open the .R file with gnuclient, e.g. "gnuclient myfile.R". (I have a key aliaised to gnuclient in my .cshrc.) The order of steps 2 and 3 can be reversed. And I don't think you need to use gnuclient, although it is faster than starting Xemacs. As for saving the session, I think you can do that when you exit R in the Xemacs window, in the usual way. But I don't. Instead, I save commands that I like (about 10% of the things I try, which is why I don't save the session) by cutting and pasting them from the first window to the second, and then I save the second. Sometimes I put # in front of them (e.g., when they involve making and saving a figure, which I don't want to remake every time I run the file). Sometimes I put readline() or stop() commands in the file, so that I don't have to run the whole thing. When you are done, you can quit R in the first window with q(), then use Xemacs for something else. When I write a paper, I usually have at least two gnuclient windows, one containing the paper, one the .R file. -- Jonathan Baron, Professor of Psychology, University of Pennsylvania Home page: http://www.sas.upenn.edu/~baron R page: http://finzi.psych.upenn.edu
"v\.demart\@libero\.it" <v.demart at libero.it> writes:> I'm trying to use ESS & xemacs under debian linux testing and KDE. > > My problem is that I didn't find any document in the internet explaining a > **step by step** session with R and xemacs.What is missing from http://www.analytics.washington.edu/~rossini/courses/cph-statcomp/cph-lab-1.html ? Admittedly, it mentions starting using "emacs -f R", but "xemacs -f R" works as well. I can update if you provide more details. (in private, no need to bore the rest of the list with the discussion). best, -tony -- rossini at u.washington.edu http://www.analytics.washington.edu/ Biomedical and Health Informatics University of Washington Biostatistics, SCHARP/HVTN Fred Hutchinson Cancer Research Center UW (Tu/Th/F): 206-616-7630 FAX=206-543-3461 | Voicemail is unreliable FHCRC (M/W): 206-667-7025 FAX=206-667-4812 | use Email CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}
Whoops. Sorry. "v\.demart\@libero\.it" <v.demart at libero.it> writes:> I'm trying to use ESS & xemacs under debian linux testing and KDE. > > My problem is that I didn't find any document in the internet explaining a > **step by step** session with R and xemacs. > > The (wrong) procedure I follow (to no avail!) is: > 1) I start R in a terminal window; > 2) I start xemacs and open a file with the extension .R (test.R); > 3) I issue M-x R RET and I can see an Rd new item in the menu;This should have given you an R shell (similar to typing R in a terminal window. Does it?> > And WHAT NEXT? > > I mean if I want to start an R interactive session under xemacs what should I do? > And, to record the session?Better to move this discussion to the ESS-help mailing list. -- rossini at u.washington.edu http://www.analytics.washington.edu/ Biomedical and Health Informatics University of Washington Biostatistics, SCHARP/HVTN Fred Hutchinson Cancer Research Center UW (Tu/Th/F): 206-616-7630 FAX=206-543-3461 | Voicemail is unreliable FHCRC (M/W): 206-667-7025 FAX=206-667-4812 | use Email CONFIDENTIALITY NOTICE: This e-mail message and any attachme...{{dropped}}
On Sun, Dec 07, 2003 at 08:38:17AM +0100, v.demart at libero.it wrote:> I'm trying to use ESS & xemacs under debian linux testing and KDE. > > My problem is that I didn't find any document in the internet explaining a > **step by step** session with R and xemacs.I think what you are looking for is probably contained in one or more files of the ESS source distribution. The Debian package I use comes with a host of documents: edd at chibud:/usr/share/doc/ess> ls ChangeLog.gz README.elsewhere changelog.gz ESS_intro.tex.gz README.gz copyright NEWS.gz README.noweb.ESS ess.dvi.gz README.S.gz TODO.gz html README.SAS.gz Why_R_mode_not_S_mode.txt readme.dvi.gz README.SPLUS4COMMAND Why_S-mode_Rocks.DMS rmh-talk.tex.gz README.XLispStat.gz ajr-talk.tex.gz slverb.sty README.additions changelog.Debian.gz which your installation of ESS may or may not carry too. For example, README.S contains the section below which I found useful. It talsk more about S/S-PLUS than R but these days most things can be expected to carry over. Last but not least, are you aware that ESS comes with an extensive manual? Hth, Dirk [...] Scenarios for use ================ We present some basic suggestions for using ESS to interact with S. These are just a subset of approaches, many better approaches are possible. Contributions of examples of how you work with ESS are appreciated (especially since it helps us determine priorities on future enhancements)! (comments as to what should be happening are prefixed by "##"). 1: ## Data Analysis Example (source code is real) ## Load the file you want to work with C-x C-f myfile.s ## Edit as appropriate, and then start up S-PLUS 3.x M-x S+3 ## A new buffer *S+3:1* will appear. Splus will have been started ## in this buffer. The buffer is in iESS [S+3:1] mode. ## Split the screen and go back to the file editing buffer. C-x 2 C-x b myfile.s ## Send regions, lines, or the entire file contents to S-PLUS. For regions, ## highlight a region with keystrokes or mouse and then send with: C-c C-r ## Re-edit myfile.s as necessary to correct any difficulties. Add ## new commands here. Send them to S by region with C-c C-r, or ## one line at a time with C-c C-n. ## Save the revised myfile.s with C-x C-s. ## Save the entire *S+3:1* interaction buffer with C-c C-s. You ## will be prompted for a file name. The recommended name is ## myfile.St. With the *.St suffix, the file will come up in ESS ## Transcript mode the next time it is accessed from Emacs. 2: ## Program revision example (source code is real) ## Start up S-PLUS 3.x in a process buffer (this will be *S+3:1*) M-x S+3 ## Load the file you want to work with C-x C-f myfile.s ## edit program, functions, and code in myfile.s, and send revised ## functions to S when ready with C-c C-f ## or highlighted regions with C-c C-r ## or individual lines with C-c C-n ## or load the entire buffer with C-c C-l ## save the revised myfile.s when you have finished C-c C-s 3: ## Program revision example (S object is real) ## Start up S-PLUS 3.x in a process buffer (this will be *S+3:1*) M-x S+3 ## Dump an existing S object my.function into a buffer to work with C-c C-d my.function ## a new buffer named yourloginname.my.function.S will be created with ## an editable copy of the object. The buffer is associated with the ## pathname /tmp/yourloginname.my.function.S and will amlost certainly not ## exist after you log off. ## enter program, functions, and code into work buffer, and send ## entire contents to S-PLUS when ready C-c C-b ## Go to *S+3:1* buffer, which is the process buffer, and examine ## the results. C-c C-y ## The sequence C-c C-y is a shortcut for: C-x b *S+3:1* ## Return to the work buffer (may/may not be prefixed) C-x C-b yourloginname.my.function.S ## Fix the function that didn't work, and resubmit by placing the ## cursor somewhere in the function and C-c C-f ## Or you could've selected a region (using the mouse, or keyboard ## via setting point/mark) and C-c C-r ## Or you could step through, line by line, using C-c C-n ## Or just send a single line (without moving to the next) using C-c C-j ## To fix that error in syntax for the "rchisq" command, get help ## by C-c C-v rchisq 4: Data Analysis (S object is real) ## Start up S-PLUS 3.x, in a process buffer (this will be *S+3:1*) M-x S+3 ## Work in the process buffer. When you find an object that needs ## to be changed (this could be a data frame, or a variable, or a ## function), dump it to a buffer: C-c C-d my.cool.function ## Edit the function as appropriate, and dump back in to the ## process buffer C-c C-b ## Return to the S-PLUS process buffer C-c C-y ## Continue working. ## When you need help, use C-c C-v rchisq ## instead of entering: help("rchisq") Customization Examples and Solutions to Problems =============================================== 1. Suppose that you are primarily an SPLUS 3.4 user, occasionally using S version 4, and sick and tired of the buffer-name *S+3* we've stuck you with. Simply edit the "ess-dialect" alist entry in the essd-s+3.el and essd-s4.el files to be "S" instead of "S4" and "S+3". This will insure that all the inferior process buffer names are "*S*". 2. Suppose that you WANT to have the first buffer name indexed by ":1", in the same manner as your S-PLUS processes 2,3,4, and 5 (for you heavy simulation people). Then uncomment the line in ess-site (or add after your (require 'ess-site) or (load "ess-site") command in your .emacs file, the line: (setq ess-plain-first-buffername nil) ) 3. Fontlocking sometimes fails to behave nicely upon errors. When Splus dumps, a mis-matched " (double-quote) can result in the wrong font-lock face being used for the remainder of the buffer. Solution: add a " at the end of the "Dumped..." statement, to revert the font-lock face back to normal. -- Those are my principles, and if you don't like them... well, I have others. -- Groucho Marx
Maybe Matching Threads
- ESS with Xemacs? [vs. Emacs, slightly off topic]
- How to configure ess-5.2.0beta3-1.i586.rpm, Xemacs and SuSE 9.0?
- gnuclient problems witrh R/ESS in linux
- XEmacs vs. GNU Emacs?
- PLEASE IGNORE PREVIOUS: How to configure ess-5.2.0beta3-1.i586.rpm, Xemacs and SuSE 9.0?