General Information: README *************************** ($Revision: 5.41 $, for ESS version 5.1.21) This is the README file for the distribution of ESS version 5.1.21, the gamma series we are using on the way to producing 5.2 (the next stable distribution). ESS is an Emacs-Lisp interface for interactive statistical programming and data analysis. Languages supported include: S dialects (S 3/4, S-PLUS 3/4/5/6, and R), LispStat dialects (XLispStat, ViSta), and SAS. Stata and SPSS dialect (SPSS, PSPP) support is being examined for possible future implementation (a preliminary Stata mode is distributed). Installation help can be found in sections for Unix Installation or Windows Installion For INSTALLATION, see way below. ESS grew out of the desire for bug fixes and extensions to S-mode-4.8. In particular, XEmacs support as well as extensions to incorporate R were desired. In addition, with new modes being developed for R, Stata, and SAS, it was felt that providing for a unifying framework would eliminate differences in the user interface, as well as to provide for faster development of production tools and statistical analysis. 5.1.x has, for its guts, the basic framework from S-mode. However, it has been cleaned, streamlined, brought closer to conformance as a standard GNU Emacs package, and redesigned for modularity and reuse. The current development team is led by A.J. (Tony) Rossini (), who did the initial port to XEmacs and has been the primary coder. Martin Maechler () and Kurt Hornik () have assisted with S-PLUS, S4, R, and XLispStat sub-modes, and Richard M. Heiberger () has assisted with S-PLUS (under MS Windows and remote access) and S4 development. Richard and Rodney Sparapani () have done much of the work for implementing the SAS sub-mode. Douglas Bates () contributed the initial S4 mode. We are grateful to David M. Smith, the previous developer (for S-mode 3.x and 4.x), as well as to the initial developers of S-mode, Doug Bates, Ed Kademan and Frank Ritter. In addition, some of the code has been and will be borrowed from Tom Cook (from his excellent SAS mode) and Thomas Lumley (preliminary Stata mode), gratefully (from us) and with permission (from them). The name is ESS. Not ESS-mode. License ======= ESS is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. ESS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License in the file COPYING in the same directory as this file for more details. New Features ============ Changes/New Features in 5.1.21: * ESS[SAS]: info documentation now available!, see ESS->Help for Statistical Packages->Help for SAS; F12 opens GSASFILE nearest point for viewing either within emacs, when available, or via an external viewer; more syntax highlighting keywords; more enhancements for remote SAS batch jobs with Kermit; new framework for remote SAS interactive jobs, see ess-remote * ESS[S]: info documentation now available!, see ESS->Help for Statistical Packages->Help for the S family * ess-remote: improved access to statistical processes running on remote machines. ess-remote in now fully documented in the info system, see ESS->ESS processes on Remote Computers * Makefile: tag now independent of rel; info files made by doc/Makefile and installed in new info sub-directory Changes/New Features in 5.1.20: * New `options()$STERM' in the S dialects (S, S-Plus, R). The S program can determine the environment in which it is currently running. ESS sets the option to `iESS' or `ddeESS' when it starts an S language process. We recommend other specific values for S language processes that ESS does not start. * New `ess-mouse-me' function, assigned to S-mouse-3 by default. User may click on a word or region and then choose from the menu to display the item, or a summary, or a plot, etc. This feature is still under development. * GNU Emacs 21.1 is now supported (fixed for S dialects, SAS & BUGS), (some from Stephen Eglen). * XEmacs 21.x is now supported (fixed w32-using-nt bug) * XEmacs on Win (NT) is better supported. * Workaround for bug in Sqpe+6 (S-PLUS 6 for Win). * should now work even when imenu is not available (for old Xemacsen). * ESS[SAS]: XEmacs-Imenu fix; C-TAB is globalized along with your function-key definitions, if specified; you can specify your SAS library definitions outside of autoexec.sas for ess-sas-data-view with SAS code placed in the variable ess-sas-data-view-libname, also the dataset name is defaulted to the nearest permanent dataset to point; Speedbar support now works for permanent datasets, please ignore first./last.; new font-locking is now the default with more improvements for font-locking PROCs, macro statements, * ; and %* ; comments; you can toggle sas-log-mode with F10 which will font-lock your .log (if it isn't too big); submit remote .sas files accessed with ange-ftp, EFS or Tramp (Kermit is experimental) by setting ess-sas-submit-method to 'sh; ess-sas-submit-command and ess-sas-submit-command-options are buffer-local so you can have local file variable sections at the end of your .sas files to request different executables or specify special options and the local file variables are re-read at submit instead of only at file open so that if you make a change it is picked up immediately; * ESS[BUGS]: font-lock with `in' fixed. * for STATA: font-lock bug fixed. * for Rd mode: C-c C-v and `switch-process' in menu. further, C-c C-f prefix (Rd-font) for inserting or surrounding a word by things such as \code{.}, \code{\link{.}}, \emph{.} etc. * new functions (ess-directory-function) and (ess-narrow-to-defun) ess-directory <-> default-directory logic (Jeff Mincy). * Re-organized Makefile and fixed a few bugs. Changes/New Features in 5.1.19: * S+6 now supported (Tony Rossini (Unix) and Rich Heiberger (Windows)) * New BUGS support through ESS[BUGS] mode (Rodney Sparapani) Templates assist you in writing .bug and .cmd code (.cmd and .log are replaced by .bmd and .bog to avoid emacs extension collisions). Substitution" parameters facilitate "automagic" generation of data...in" and "init...in" filenames, "const N=" from your data file and "monitor()/stats()" commands. Activated by pressing F12. * Fixes for `ess-smart-underscore' SAS breakage (Rich Heiberger) * You can change between PC and Unix, local and global SAS function-key definitions interactively (Rich Heiberger) * C-Submit a highlighted region to SAS batch (Rodney Sparapani) * New and improved SAS syntax highlighting (Rodney Sparapani) To get the new functionality, set ess-sas-run-make-regexp to nil. Also available in .log files via F10. * Open a permanent SAS dataset for viewing via F9 (Rodney Sparapani) You must have the library defined in autoexec.sas for it to work. * User-friendly defaults for `sas-program', `ess-sas-batch-pre-command' and `ess-sas-batch-post-command' as well Customize support for these and other ESS[SAS] variables (Rodney Sparapani) * `ess-sas-suffix-2' now defaults to .dat via F11 (Rodney Sparapani) * Emacs/XEmacs, Unix/Windows issues collectively handled in ess-emcs.el * defadvice solves problem of missing *ESS* (thanks to Jeff Mincy) * Improved manual a bit by including things that were only in `README'. Changes/New Features in 5.1.18: * New `ess-smart-underscore' function, now assigned to "_" by default. Inserts `ess-S-assign' (customizable " <- "), unless inside string and comments where plain "_" is used instead. (MM) * Fixes for longstanding interactive SAS breakage (RMH) Changes/New Features in 5.1.17: * Documentation for Windows Installation (Rich Heiberger ()) * removal of ess-vars, finalization of customize support (in the sense that there is no more use of ess-vars, but that we need to fix ess-cust) (AJ Rossini ()) * Many small (and large) fixes/contributions (MMaechler, ()). * addition of the "S-equal" variable and provide M-x ess-add-MM-keys a way to remap "_" to `ess-S-assign', typically " <- ", but customizable. (MMaechler, ()). Changes/New Features in 5.1.16: * BUG FIXES * Better SAS support Changes/New Features in 5.1.15: * BUG FIXES Changes/New Features in 5.1.14: * Yet more fixes to SAS mode, (Rich Heiberger () and Rodney Sparapani )). * Customize support (for most Emacsen which support it) (AJRossini, () * ARC and ViSta support out of the box, and fixes for XLispStat (AJRossini, ) Changes/New Features in 5.1.13: * Version numbering finally all depending on the ./VERSION file, thanks to Martin Maechler. * Yet more fixes to SAS mode, thanks to Rich Heiberger (). Changes/New Features in 5.1.12: * Splus 5.1 stabilized, thanks to Martin Maechler, Bill Venables, Chuck Taylor, and others. * More fixes to SAS mode, thanks to Rodney Sparapani () and Rich Heiberger (). Changes/New Features in 5.1.11: * More fixes to Stata mode, thanks to Brendan Halpin () * fixed bugs in ESS-elsewhere, thanks to many testers * README.SPLUS4WIN has DETAILED instructions for S-PLUS 2000, thanks to David Brahm (). * Fixes to SAS mode, thanks to Rodney Sparapani () Changes/New Features in 5.1.10: * More fixes to Stata mode * primitive generic version of ESS-elsewhere * Small fixes to SAS/Stata. Changes/New Features in 5.1.9: * Stata mode works * Literate Data Analysis using Noweb works Changes/New Features in 5.1.8: * Bug fixes * R documentation mode defaults changed Changes/New Features in 5.1.2: * able to use inferior iESS mode to communicate directly with a running S-Plus 4.x process using the Microsoft DDE protocol. We use the familiar (from Unix ESS) C-c C-n and related key sequences to send lines from the S-mode file to the inferior S process. We continue to edit S input files in ESS[S] mode and transcripts of previous S sessions in ESS Transcript mode. All three modes know the S language, syntax, and indentation patterns and provide the syntactic highlighting that eases the programming tasks. Current Features ================ * Languages Supported: * S dialects (S 3/4, S-PLUS 3.x/4.x/5.x/6.x, and R) * SAS * BUGS * Stata * XLispStat including Arc and ViSta * Editing source code (S, XLispStat, SAS, BUGS) * Syntactic indentation and highlighting of source code * Partial evaluation of code * Loading and error-checking of code * Source code revision maintenance * Batch execution (SAS, BUGS) * Interacting with the process (S, XLispStat, SAS) * Command-line editing * Searchable Command history * Command-line completion of S object names and file names * Quick access to object lists and search lists * Transcript recording * Interface to the help system * Transcript manipulation (S3, S+3, S4, R, XLispStat) * Recording and saving transcript files * Manipulating and editing saved transcripts * Re-evaluating commands from transcript files * Help File Editing (R) * Syntactic indentation and highlighting of source code. * Sending Examples to running ESS process. * Previewing Stability ========= Versions 5.1.x are meant to be gamma-level releases. While some bugs are fixed, others may have been introduced, especially with regards to new features. See the file doc/TODO for details. Bug reports are solicited; see the Bugs Section below. Patches or suggested coding fixes with bug reports are much appreciated! Requirements ============ ESS version 5.1.n (n >= 2) works best with either GNU Emacs version 20.3 or higher, or XEmacs version 20.0 or higher. It has been most thoroughly tested with: * S-PLUS versions 3.3, 3.4, 4.5, 5.0, 5.1, 6 * R versions >=0.49 * S4 * SAS 6.x, 7.x, 8.x * BUGS 0.5 or 0.603 * Stata >=6.0 * XLispStat versions >=3.50 on the following platforms * Solaris/SunOS (all) * SGI (all) * Linux (S-PLUS 5.0, 5.1, R, XLispStat, S4, Stata 6.0) * Microsoft Windows 95/98/NT/2000 (SPLUS 4.5 and 2000) * Apple Mac OS (SAS for OS 9 and X11 R for OS X) with the following versions of emacs * GNU Emacs 20.3, 20.4, 20.5, 20.6, 20.7, 21.1 * XEmacs 20.0, 20.4, 21.0, 21.1.13, 21.1.14, 21.4 * XEmacs 19.14, 19.16 and GNU Emacs 19.28, 19.29, 19.34(1) ---------- Footnotes ---------- (1) Note that you must have `custom' support. It is available at Abraham's Custom Pkg (http://www.dina.kvl.dk/~abraham/custom/). These releases of emacs are no longer supported, so an upgrade is recommended if you plan to use ESS. This is not to say that ESS will not work, but it will be up to the user to set it up on their own. If you have GNU Emacs 19.29, you _may_ get it to work after unpacking `19.29.tar.gz', see the installation instructions. Getting the Latest Version ========================== The latest stable version of ESS is always available on the web at: ESS web page (http://software.biostat.washington.edu/ess/) or StatLib (http://lib.stat.cmu.edu/general/ESS/) The latest (no more than 24 hours behind the developers) version of ESS can also be retrieved using anonymous cvs: You need a cvs client (that works with your firewall, if any) the repository name is `:pserver:anoncvs@software.biostat.washington.edu:/var/anoncvs' using a command-line cvs client (i.e. on Unix or DOS), first type: `cvs -d :pserver:anoncvs@software.biostat.washington.edu:/var/anoncvs login' password is anoncvs then type: `cvs -d :pserver:anoncvs@software.biostat.washington.edu:/var/anoncvs co ess' Installation (from tar file) ============================ We now discuss installation, which might happen under Unix or Microsoft Windows. First, we discuss Unix installation. *Note Unix installation::. For Microsoft Windows Installation please skip to the *Note Microsoft Windows installation::. Unix installation ================= 1. cd to a directory where you keep emacs lisp files, or create a new directory to hold the distribution. This directory will be referred to below as "the ESS distribution directory". It will contain, at the end, the tar file `ess-5.1.21.tar.gz', and a directory for the ESS source, which will be termed "the ESS-5.1.21 source directory". Note that the .elc files may be installed elsewhere (as specified in the Makefile) if desired. 2. Retrieve the gzipped tar file or zipped file from 3. Copy `ess-5.1.21.tar.gz' to the location where you want the ESS-5.1.21 directory, and cd there. Extract the files from the distribution, which will unpack into a subdirectory, ess-5.1.21. gunzip ess-5.1.21.tar.gz tar vxf ess-5.1.21.tar (or: `gunzip < ess-5.1.21.tar.gz | tar vxf -' ). (or using GNU tar: `tar zvxf ess-5.1.21.tar.gz'). The `tar' command will extract files into the current directory. Do not create ess-5.1.21 yourself, or you will get an extra level of depth to your directory structure. Note if you have a very ancient version of GNU emacs (_and_ really can not upgrade to Emacs 20 or higher!) you can unpack the `lisp/19.29.tar.gz' file, read the ensuing `lisp/19.29/README' and you may succeed... 4. Edit the file `lisp/ess-site.el' as explained in the comments section of that file. Installations that are using ESS only for S-Plus 6.x will probably not need to make any changes. Installations that also have one or more of (S+5 S4 S+4 S+3 R SAS XLispStat Stata) may need to uncomment corresponding lines in `ess-site.el'. 5. READ THIS ITEM THOROUGHLY BEFORE STARTING: In the ess-5.1.21 directory, edit the file `Makeconf' (only if you want to place the executables in other locations; see LISPDIR and INFODIR) and then type: make If this works, then you might try: make install Note that the latter does the former as well, so if you are feeling lucky, you might want to skip it. This will install the info files (and the lisp files, if they are to go in another directory). Don't forget to edit the file `dir' in the info directory specified by `INFODIR' in `doc/Makefile'. See the sample `dir' file for an example of the line to add. If you are using XEmacs, you might do: make EMACS=xemacs and then make EMACS=xemacs install instead of editing the Makefile. _Note_ that you might need to use GNU make for everything to work properly An alternative, if you are running XEmacs and have access to the XEmacs system directories, would be to place the directory in the site-lisp directory, and simply type `make' (and copy the documentation as appropriate). For Emacs, you would still have to move the files into the top level site-lisp directory. 6. Add the line (load "/PATH/ess-site") to your .emacs file (or default.el or site-init.el, for a site-wide installation). Replace `/PATH' above with the value of ess-lisp-directory as defined in ess-site.el. (GNU emacs uses the filename `~/.emacs' and Xemacs uses the filename `~/.xemacs/init.el' for the initialization file.) Alternatively, if ess-site.el is in your current Lisp path, you can do: (require 'ess-site) to configure Emacs for ESS. 7. (OPTIONAL) If you are running S-PLUS or R, you might consider installing the database files. From within (X)Emacs, `C-x d' to the directory containing ESS. Now: M-x S+6 get running. once you have reached the SPLUS prompt, do: M-x ess-create-object-name-db (this will create the file `ess-s+6-namedb.el'; if it isn't in the ESS directory, move it there). Then, completions will be autoloaded and will not be regenerated for every session. For R, do the same, using M-x R and then `M-x ess-create-object-name-db' creating `ess-r-namedb.el'; if it isn't in the ESS directory, move it there). 8. For more information on using ESS in your daily work, see the files README.S, README.SAS, and README.XLispStat. For the impatient, the quick version of usage follows: 9. To edit statistical programs, load the files with the requiste extensions (".sas" for SAS, ".S" for S-PLUS, ".R" for R, and ".lsp" for XLispStat). 10. To run statistical processes under (X)Emacs: Run S-PLUS 6.x with: M-x S+6 (or M-x S using backwards compatibility). You will then be asked for a pathname ("S starting data directory?"), from which to start the process. If you wish to run R, you can start it with: M-x R XLispStat can be run with M-x XLS An interactive SAS can be run in an `iESS[SAS]' buffer with: M-x SAS This works when SAS is running on a Unix machine, either the local machine or over a network connection. M-x SAS does not work when SAS is running on a Windows machine. 11. That's it! Microsoft Windows installation ============================== For Microsoft Windows installation, please follow the next steps: (see separate instructions above for UNIX *Note Unix installation::. 1. cd to a directory where you keep emacs lisp files, or create a new directory (for example, `c:\emacs\') to hold the distribution. This directory will be referred to below as "the ESS distribution directory". It will contain, at the end, either the tar file `ess-5.1.21.tar.gz' or the zip file `ess-5.1.21.zip', and a directory for the ESS source, which will be termed "the ESS-5.1.21 source directory". 2. Retrieve the compressed tar file `ess-5.1.21.tar.gz' or the zipped file `ess-5.1.21.zip' from one of the FTP or WWW archive sites via FTP (or HTTP). Be aware that http browsers on Windows frequently change the "." and "-" characters in filenames to other punctuation. Please change the names back to their original form. 3. Copy `ess-5.1.21.tar.gz' to the location where you want the ess-5.1.21 directory, for example to `c:\emacs\ess-5.1.21.tar.gz', and cd there. For example, cd c:\emacs Extract the files from the distribution, which will unpack into a subdirectory, `ess-5.1.21'. gunzip ess-5.1.21.tar.gz tar vxf ess-5.1.21.tar (or: `gunzip < ess-5.1.21.tar.gz | tar vxf -' ). (or: from the zip file: `unzip ess-5.1.21.zip') The `tar' command will extract files into the current directory. Do not create `ess-5.1.21' yourself, or you will get an extra level of depth to your directory structure. 4. Windows users will usually be able to use the `lisp/ess-site.el' as distributed. Only rarely will changes be needed. 5. Windows users will need to make sure that the directories for the software they will be using is in the PATH environment variable. On Windows 9x, add lines similar to the following to your `c:\autoexec.bat' file: path=%PATH%;c:\progra~1\spls2000\cmd On Windows NT/2000, add the directories to the PATH using the MyComputer menu. Note that the directory containing the program is added to the PATH, not the program itself. One such line is needed for each software program. Be sure to use the abbreviation `progra~1' and not the long version with embedded blanks. Use backslashes "\". 6. Add the line (load "/PATH/ess-site") to your .emacs (or _emacs) file (or default.el or site-init.el, for a site-wide installation). Replace `/PATH' above with the value of ess-lisp-directory as defined in `ess-site.el'. Use forwardslashes `/'. (GNU emacs uses the filename `~/.emacs' and Xemacs uses the filename `~/.xemacs/init.el' for the initialization file.) 7. (OPTIONAL) If you are running Sqpe or R, you might consider installing the database files. From within (X)Emacs, `C-x d' to the directory containing ESS. Now: M-x Sqpe+6 (get running. once you have reached the SPLUS prompt, do:) M-x ess-create-object-name-db (this will create the file `ess-s+6-namedb.el'; if it isn't in the ESS directory, move it there). Then, completions will be autoloaded and will not be regenerated for every session. For R, do the same, using M-x R and then `M-x ess-create-object-name-db' creating `ess-r-namedb.el'; if it isn't in the ESS directory, move it there). 8. For more information on using ESS in your daily work, see the files doc/README.SPLUS4WIN, doc/README.S, doc/README.SAS, and doc/README.XLispStat. For the impatient, the quick version of usage follows: 9. To edit statistical programs, load the files with the requisite extensions (".sas" for SAS, ".S" or "s" or "q" or "Q" for S-PLUS, ".r" or ".R" for R, and ".lsp" for XLispStat). 10. To run statistical processes under (X)Emacs: Run S-PLUS 6.x or 2000 with: M-x S+6 (or `M-x S'). You will then be asked for a pathname ("S starting data directory?"), from which to start the process. The prompt will propose your current directory as the default. Similarly for S-PLUS 6.x. Send lines or regions from the emacs buffer containing your S program (for example, `myfile.s') to the S-Plus Commands Window with the `C-c C-n' or `C-c C-r' keys. Run S-PLUS 6.x or 2000 inside an emacs buffer M-x Sqpe+6 You will then be asked for a pathname ("S starting data directory?"), from which to start the process. The prompt will propose your current directory as the default. Similarly for S-PLUS 6.x. Send lines or regions from the emacs buffer containing your S program (for example, `myfile.s') to the *S+6* buffer with the `C-c C-n' or `C-c C-r' keys. You do not have access to interactive graphics in this mode. You get Unix-like behavior, in particular the entire transcript is available for emacs-style search commands. If you wish to run R, you can start it with: M-x R XLispStat can not currently be run with M-x XLS Hopefully, this will change. However, you can still edit with Emacs, and cut and paste the results into the XLispStat *Listener* Window under Microsoft Windows. SAS for Windows uses the batch access with function keys that is described in `doc/README.SAS'. The user can also edit SAS files in an `ESS[SAS]' buffer and than manually copy and paste them into an Editor window in the SAS Display Manager. For Windows, inferior SAS in an `iESS[SAS]' buffer does not work on the local machine. It does work over a network connection to SAS running on a remote Unix computer. Reason: we use ddeclient to interface with programs and SAS doesn't provide the corresponding ddeserver capability. 11. That's it! Reporting Bugs ============== Please send bug reports, suggestions etc. to The easiest way to do this is within Emacs by typing `M-x ess-submit-bug-report' This also gives the maintainers valuable information about your installation which may help us to identify or even fix the bug. Note that comments, suggestions, words of praise and large cash donations are also more than welcome. Mailing Lists ============= There is a mailing list for discussions and announcements relating to ESS. Join the list by sending an e-mail with "subscribe ess-help" (or "help") in the body to ; contributions to the list may be mailed to . Rest assured, this is a fairly low-volume mailing list. The purposes of the mailing list include * helping users of ESS to get along with it. * discussing aspects of using ESS on Emacs and XEmacs. * suggestions for improvements. * announcements of new releases of ESS. * posting small patches to ESS. Authors ======= * A.J. Rossini (http://www.biostat.washington.edu/~rossini/) * Richard M. Heiberger (http://www.sbm.temple.edu/departments/statistics/) * Kurt Hornik (http://www.ci.tuwien.ac.at/~hornik) * Martin Maechler (http://stat.ethz.ch/~maechler/) * Rodney Sparapani (http://www.mcw.edu/pcor/rsparapa)