ABSTRACT

This chapter presents case studies and examples of the use of S language, chosen to illustrate styles of computing with S that have proven to be effective. Each example tries to be fairly realistic and at the same time to feature one or more techniques. In any data analysis, much time will be spent making sure the data have been correctly recorded and brought into S. The data are being typed by someone who understands what they represent. As a result, some mistakes in the data can be found, and corrective actions can be taken that would otherwise have to wait for analysis. Once the data has been typed in, people can use the computer to check it. Scan will read any number of fields per line, returning a list with one component per field; that is, all the values in the first field go into the first component of the list, and so forth.