Duncan Temple Lang Embedding S in Other Languages and Environments *********************************************** Interfaces to other languages such as C and Fortran have provided S users access to a vast collection of existing software. Adding general interfaces to other languages allows us to access the software developed for those languages. In addition to providing S users with easy and immediate access to the functionality in languages such as Java, Python and Perl, these interfaces also work in reverse, providing users of those environments with access to S. This allows us to export high-quality statistical software to a larger and broader audience than data analysts and statisticians and have a greater impact on the way statistical methodology is used. In this talk, we illustrate how embedding R can be used in a variety of different applications. We focus on a single example -- dynamic and interactive report generation. This shows how we can make use of S directly from within Perl, XML and XSL, Netscape and JavaScript and the Postgres database server. As well as widening the audience, embedding S within these languages allows S programmers more flexibility in choosing the correct tool for any particular task. Much of the flexibility and expressiveness of this inter-language mechanism comes from 1) using references rather than copying data between the systems, and 2) using direct function calls rather than evaluating strings in the other system. Interfaces to each of the languages and systems mentioned is made available via an Omegahat package for R.