ArticleslgStudy

mathematics

S (programming language)

S (programming language) is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand S (programming language) rather than just read about it. In short: S is a statistical programming language developed primarily by John Chambers and (in earlier versions) Rick Becker, Trevor Hastie, William Cleveland and Allan Wilks of Bell Laboratories. The aim of the language, as expressed by John Chambers, is "to turn ideas into software, quickly and faithfully".

Key takeaways

  • S (programming language) belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect S (programming language) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of S (programming language) from memory before moving on to harder problems.

Reference excerpt

S is a statistical programming language developed primarily by John Chambers and (in earlier versions) Rick Becker, Trevor Hastie, William Cleveland and Allan Wilks of Bell Laboratories. The aim of the language, as expressed by John Chambers, is "to turn ideas into software, quickly and faithfully". It was formerly widely used by academic researchers, but has now been superseded by the partially backwards compatible R language, a part of the GNU free software project. S-PLUS was a widely used commercial implementation of S that was formerly sold by TIBCO Software.

History

"Old S" S is one of several statistical computing languages that were designed at Bell Laboratories, and first took form between 1975–1976. Up to that time, much of the statistical computing was done by directly calling Fortran subroutines; however, S was designed to offer an alternate and more interactive approach, motivated in part by exploratory data analysis advocated by John Tukey. Early design decisions that hold even today include interactive graphics devices (printers and character terminals at the time), and providing easily accessible documentation for the functions. Development of the project was led by John Chambers and Trevor Hastie, and included developers Richard Becker, Allan Wilks, John Chambers, and William Cleveland, all of whom were then employees of AT&T. Out of the developers who contributed to S, Chambers is generally agreed to be the most significant contributor. Chambers received the Software System Award from the Association for Computing Machinery for his work on S. The first working version of S was built in 1976, and ran on the GCOS operating system. At this time, S was unnamed; naming suggestions included ISCS (Interactive SCS), SCS (Statistical Computing System), and SAS (Statistical Analysis System) (which was already taken: see SAS System). The name 'S' (used with single quotation marks until 1979) was chosen, as it was a common letter in the suggestions and consistent with other programming languages designed from the same institution at the time (namely the C programming language). It stands for the word "statistics". When UNIX/32V was ported to the (then new) 32-bit DEC VAX, computing on the Unix platform became feasible for S. In late 1979, S2 was ported from GCOS to UNIX, which would become the new primary platform. In 1980 the first version of S was distributed outside Bell Laboratories and in 1981 source versions were made available. S was distributed freely in academic circles, and became popular among academic statisticians. The research team at Bell Laboratories published two books in 1984: S: An Interactive Environment for Data Analysis and Graphics (known as the 'Brown Book') and Extending the S System. Also, in 1984 the source code for S became licensed through AT&T Software Sales for education and commercial purposes.

"New S" The first version of S-PLUS was released by Statistical Sciences, Inc. in 1988. S-PLUS was later sold to TIBCO Software. By this time, many changes were made to S and the syntax of the language with the release of S3. The New S Language (known as the 'Blue Book') was published to introduce the new features, such as the transition from macros to functions and how functions can be passed to other functions (such as apply). Many other changes to the S language were to extend the concept of "objects", and to make the syntax more consistent (and strict). However, many users found the transition to New S difficult, since their macros needed to be rewritten. Many other changes to S took hold, such as the use of X11 and PostScript graphics devices, rewriting many internal functions from Fortran to C, and the use of double precision (only) arithmetic. The New S language is very similar to that used in modern versions of S-PLUS and R. The graphical user interface of S was also updated interactive graphical features after integration with Axum. Statistical Models in S (known as the 'White Book') was published in 1991, introducing Wilkinson-Rogers formula notation (using the ~ operator) for defining statistical models, data frame objects, and modifications to the use of object methods and classes.

S4 The latest version of the S standard is S4, released in 1998. It provides advanced object-oriented features. S4 classes differ markedly from S3 classes; S4 formally defines the representation and inheritance for each class, and has multiple dispatch: the generic function can be dispatched to a method based on the class of any number of arguments, not just one.

See also R (programming language), derivative language based on S programming language that is partially backward compatible with S programs

References

External links Evolution of the S Language, by John M. Chambers, discusses the new features in Version 4 of S (in PostScript format), Archived 2023-06-19 at the Wayback Machine

Worked examples

Example 1 — a first encounter with S (programming language)

Start with the simplest possible case. Write down what S (programming language) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to S (programming language) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about S (programming language) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of S (programming language)

In research
S (programming language) appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses S (programming language) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
S (programming language) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Programming languages, Programming languages created in 1976, Statistical programming languages, so understanding it makes those chapters shorter.
In everyday life
Look for S (programming language) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study S (programming language) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what S (programming language) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain S (programming language) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is S (programming language) in simple terms?

S is a statistical programming language developed primarily by John Chambers and (in earlier versions) Rick Becker, Trevor Hastie, William Cleveland and Allan Wilks of Bell Laboratories. The aim of the language, as expressed by John Chambers, is "to turn ideas into software, quickly and faithfully".

Why does S (programming language) matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study S (programming language)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on S (programming language).

Tags

  • Programming languages
  • Programming languages created in 1976
  • Statistical programming languages

Keep exploring