In addition, modes of type (1) provide the capability to submit a batch job for statistical packages like SAS, BUGS or JAGS when an interactive session is unwanted due to the potentially lengthy time required for the task to complete.
There are a number of advantages of doing data analysis using Emacs/ESS in this way, rather than interacting with R, S-PLUS or other software directly.
First, as indicated above, ESS provides a convenient way of writing and executing code without frequently switching between programs.
This also encourages the good practice of keeping a record of one's data analysis, equivalent to working from do-files in Stata.
Third, since emacs is also an able editor of LaTeX files, it facilitates the integration of data analysis and written text with Sweave.