Difference between revisions of "S language"
imported>S |
imported>S |
||
Line 10: | Line 10: | ||
<p style="margin: 0.5em 0px">When<span class="Apple-converted-space"> </span><a title="UNIX/32V" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/UNIX/32V">UNIX/32V</a><span class="Apple-converted-space"> </span>was ported to the (then new) 32-bit<span class="Apple-converted-space"> </span><a title="Digital Equipment Corporation" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/Digital_Equipment_Corporation">DEC</a><span class="Apple-converted-space"> </span><a title="VAX" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/VAX">VAX</a>, computing on the<span class="Apple-converted-space"> </span><a title="Unix" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/Unix">Unix</a><span class="Apple-converted-space"> </span>platform became feasible for S. In late 1979, S was ported from GCOS to UNIX, which would become the new primary platform.</p> | <p style="margin: 0.5em 0px">When<span class="Apple-converted-space"> </span><a title="UNIX/32V" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/UNIX/32V">UNIX/32V</a><span class="Apple-converted-space"> </span>was ported to the (then new) 32-bit<span class="Apple-converted-space"> </span><a title="Digital Equipment Corporation" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/Digital_Equipment_Corporation">DEC</a><span class="Apple-converted-space"> </span><a title="VAX" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/VAX">VAX</a>, computing on the<span class="Apple-converted-space"> </span><a title="Unix" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/Unix">Unix</a><span class="Apple-converted-space"> </span>platform became feasible for S. In late 1979, S was ported from GCOS to UNIX, which would become the new primary platform.</p> | ||
<p style="margin: 0.5em 0px">In 1980 the first version of S was distributed outside Bell Laboratories and in 1981 source versions were made available.<sup id="cite_ref-Becker_1-1" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-Becker-1"><span>[</span>1<span>]</span></a></sup><span class="Apple-converted-space"> </span>In 1984 two books were published by the research team at Bell Laboratories:<span class="Apple-converted-space"> </span><i>S: An Interactive Environment for Data Analysis and Graphics</i><sup id="cite_ref-2" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-2"><span>[</span>2<span>]</span></a></sup><span class="Apple-converted-space"> </span>(1984 Brown Book) and<span class="Apple-converted-space"> </span><i>Extending the S System</i>.<sup id="cite_ref-3" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-3"><span>[</span>3<span>]</span></a></sup><span class="Apple-converted-space"> </span>Also, in 1984 the source code for S became licensed through AT&T Software Sales for education and commercial purposes.</p> | <p style="margin: 0.5em 0px">In 1980 the first version of S was distributed outside Bell Laboratories and in 1981 source versions were made available.<sup id="cite_ref-Becker_1-1" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-Becker-1"><span>[</span>1<span>]</span></a></sup><span class="Apple-converted-space"> </span>In 1984 two books were published by the research team at Bell Laboratories:<span class="Apple-converted-space"> </span><i>S: An Interactive Environment for Data Analysis and Graphics</i><sup id="cite_ref-2" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-2"><span>[</span>2<span>]</span></a></sup><span class="Apple-converted-space"> </span>(1984 Brown Book) and<span class="Apple-converted-space"> </span><i>Extending the S System</i>.<sup id="cite_ref-3" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-3"><span>[</span>3<span>]</span></a></sup><span class="Apple-converted-space"> </span>Also, in 1984 the source code for S became licensed through AT&T Software Sales for education and commercial purposes.</p> | ||
− | < | + | <p><b><span id=".22New_S.22" class="mw-headline">"New S"</span></b></p> |
<p style="margin: 0.5em 0px">By 1988, many changes were made to S and the syntax of the language.<span class="Apple-converted-space"> </span><i>The New S Language</i><sup id="cite_ref-4" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-4"><span>[</span>4<span>]</span></a></sup><span class="Apple-converted-space"> </span>(1988 Blue Book) was published to introduce the new features, such as the transition from<span class="Apple-converted-space"> </span><i>macros</i><span class="Apple-converted-space"> </span>to<span class="Apple-converted-space"> </span><i>functions</i><span class="Apple-converted-space"> </span>and how functions can be passed to other functions (such as<span class="Apple-converted-space"> </span><code style="border-top: rgb(221,221,221) 1px solid; font-family: monospace, Courier; border-right: rgb(221,221,221) 1px solid; border-bottom: rgb(221,221,221) 1px solid; color: black; padding-bottom: 1px; padding-top: 1px; padding-left: 4px; border-left: rgb(221,221,221) 1px solid; padding-right: 4px; background-color: rgb(249,249,249); border-radius: 2px">apply</code>). 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<span class="Apple-converted-space"> </span><i>New S</i><span class="Apple-converted-space"> </span>difficult, since their macros needed to be rewritten. Many other changes to S took hold, such as the use of<span class="Apple-converted-space"> </span><a title="X Window System" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/X_Window_System">X11</a><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><a title="PostScript" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/PostScript">PostScript</a><span class="Apple-converted-space"> </span>graphics devices, rewriting many internal functions from Fortran to C, and the use of<a title="Double precision" class="mw-redirect" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/Double_precision">double precision</a><span class="Apple-converted-space"> </span>(only) arithmetic. The<span class="Apple-converted-space"> </span><i>New S</i><span class="Apple-converted-space"> </span>language is very similar to that used in modern versions of<span class="Apple-converted-space"> </span><a title="S-plus" class="mw-redirect" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S-plus">S-PLUS</a><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><a title="R (programming language)" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/R_(programming_language)">R</a>.</p> | <p style="margin: 0.5em 0px">By 1988, many changes were made to S and the syntax of the language.<span class="Apple-converted-space"> </span><i>The New S Language</i><sup id="cite_ref-4" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-4"><span>[</span>4<span>]</span></a></sup><span class="Apple-converted-space"> </span>(1988 Blue Book) was published to introduce the new features, such as the transition from<span class="Apple-converted-space"> </span><i>macros</i><span class="Apple-converted-space"> </span>to<span class="Apple-converted-space"> </span><i>functions</i><span class="Apple-converted-space"> </span>and how functions can be passed to other functions (such as<span class="Apple-converted-space"> </span><code style="border-top: rgb(221,221,221) 1px solid; font-family: monospace, Courier; border-right: rgb(221,221,221) 1px solid; border-bottom: rgb(221,221,221) 1px solid; color: black; padding-bottom: 1px; padding-top: 1px; padding-left: 4px; border-left: rgb(221,221,221) 1px solid; padding-right: 4px; background-color: rgb(249,249,249); border-radius: 2px">apply</code>). 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<span class="Apple-converted-space"> </span><i>New S</i><span class="Apple-converted-space"> </span>difficult, since their macros needed to be rewritten. Many other changes to S took hold, such as the use of<span class="Apple-converted-space"> </span><a title="X Window System" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/X_Window_System">X11</a><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><a title="PostScript" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/PostScript">PostScript</a><span class="Apple-converted-space"> </span>graphics devices, rewriting many internal functions from Fortran to C, and the use of<a title="Double precision" class="mw-redirect" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/Double_precision">double precision</a><span class="Apple-converted-space"> </span>(only) arithmetic. The<span class="Apple-converted-space"> </span><i>New S</i><span class="Apple-converted-space"> </span>language is very similar to that used in modern versions of<span class="Apple-converted-space"> </span><a title="S-plus" class="mw-redirect" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S-plus">S-PLUS</a><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><a title="R (programming language)" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/R_(programming_language)">R</a>.</p> | ||
<p style="margin: 0.5em 0px">In 1991,<span class="Apple-converted-space"> </span><i>Statistical Models in S</i><sup id="cite_ref-5" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-5"><span>[</span>5<span>]</span></a></sup><span class="Apple-converted-space"> </span>(1991 White Book) was published, which introduced the use of formula-notation<sup id="cite_ref-6" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-6"><span>[</span>6<span>]</span></a></sup><span class="Apple-converted-space"> </span>(which use the '<tt style="font-family: monospace, Courier">~</tt>' operator), data frame objects, and modifications to the use of object<span class="Apple-converted-space"> </span><a title="Method (computer science)" class="mw-redirect" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/Method_(computer_science)">methods</a><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><a title="Class (computer science)" class="mw-redirect" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/Class_(computer_science)">classes</a>.</p> | <p style="margin: 0.5em 0px">In 1991,<span class="Apple-converted-space"> </span><i>Statistical Models in S</i><sup id="cite_ref-5" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-5"><span>[</span>5<span>]</span></a></sup><span class="Apple-converted-space"> </span>(1991 White Book) was published, which introduced the use of formula-notation<sup id="cite_ref-6" class="reference" style="font-size: 11px; font-weight: normal; font-style: normal; line-height: 1"><a style="text-decoration: none; background: none transparent scroll repeat 0% 0%; white-space: nowrap; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/S_(programming_language)#cite_note-6"><span>[</span>6<span>]</span></a></sup><span class="Apple-converted-space"> </span>(which use the '<tt style="font-family: monospace, Courier">~</tt>' operator), data frame objects, and modifications to the use of object<span class="Apple-converted-space"> </span><a title="Method (computer science)" class="mw-redirect" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/Method_(computer_science)">methods</a><span class="Apple-converted-space"> </span>and<span class="Apple-converted-space"> </span><a title="Class (computer science)" class="mw-redirect" style="text-decoration: none; background: none transparent scroll repeat 0% 0%; color: rgb(11,0,128)" href="http://en.wikipedia.org/wiki/Class_(computer_science)">classes</a>.</p> | ||
− | < | + | <p><span id="S4" class="mw-headline">S4</span></p> |
<p style="margin: 0.5em 0px">Version 4 of S, often abbreviated S4, provides advanced object-oriented features. S4 classes differ markedly from S3 classes.</p> | <p style="margin: 0.5em 0px">Version 4 of S, often abbreviated S4, provides advanced object-oriented features. S4 classes differ markedly from S3 classes.</p> | ||
− | <h2 style="overflow: hidden; font-size: 1.5em; font-family: 'Linux Libertine', Georgia, Times, serif; background: none transparent scroll repeat 0% 0%; border-bottom: rgb(170,170,170) 1px solid; font-weight: normal; color: black; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 1em 0px 0.25em; line-height: 1.3; padding-right: 0px"><span id="References" class="mw-headline">References | + | <h2 style="overflow: hidden; font-size: 1.5em; font-family: 'Linux Libertine', Georgia, Times, serif; background: none transparent scroll repeat 0% 0%; border-bottom: rgb(170,170,170) 1px solid; font-weight: normal; color: black; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 1em 0px 0.25em; line-height: 1.3; padding-right: 0px"><span id="References" class="mw-headline">References</span></h2> |
<div class="reflist" style="list-style-type: decimal; margin-bottom: 0.5em; font-size: 12px"> | <div class="reflist" style="list-style-type: decimal; margin-bottom: 0.5em; font-size: 12px"> | ||
<ol class="references" style="font-size: 12px; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0.3em 0px 0.5em 3.2em; list-style-image: none; line-height: 1.5em; padding-right: 0px"> | <ol class="references" style="font-size: 12px; padding-bottom: 0px; padding-top: 0px; padding-left: 0px; margin: 0.3em 0px 0.5em 3.2em; list-style-image: none; line-height: 1.5em; padding-right: 0px"> |
Latest revision as of 23:11, 3 May 2015
S is a statistical programming language developed primarily by John Chambers and (in earlier versions) Rick Becker 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."
The two modern implementations of S are R, part of the GNU free software project, and S-PLUS.
History
"Old S"
S is one of several statistical computing languages that were designed at Bell Laboratories, and first took form between 1975–1976.[1] 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. 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.
The first working version of S was built in 1976, and operated on the GCOS operating system. At this time, S was unnamed, and suggestions included Interactive SCS (ISCS),Statistical Computing System, and Statistical Analysis System (which was already taken: see SAS System). The name 'S' (used with single quotation marks, until 1979) was chosen, as it has the common letter used in statistical computing, and is consistent with other programming languages designed from the same institution at the time (namely the C programming language).
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, S 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.[1] In 1984 two books were published by the research team at Bell Laboratories: S: An Interactive Environment for Data Analysis and Graphics[2] (1984 Brown Book) and Extending the S System.[3] Also, in 1984 the source code for S became licensed through AT&T Software Sales for education and commercial purposes.
"New S"
By 1988, many changes were made to S and the syntax of the language. The New S Language[4] (1988 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 ofdouble precision (only) arithmetic. The New S language is very similar to that used in modern versions of S-PLUS and R.
In 1991, Statistical Models in S[5] (1991 White Book) was published, which introduced the use of formula-notation[6] (which use the '~' operator), data frame objects, and modifications to the use of object methods and classes.
S4
Version 4 of S, often abbreviated S4, provides advanced object-oriented features. S4 classes differ markedly from S3 classes.
References
- ^ a b Becker, Richard A., A Brief History of S (PS), Murray Hill, New Jersey: AT&T Bell Laboratories, retrieved 2014-08-18
- ^ Becker, R.A.; Chambers, J.M. (1984). S: An Interactive Environment for Data Analysis and Graphics. Pacific Grove, CA, USA: Wadsworth & Brooks/Cole. ISBN 0-534-03313-X.
- ^ Becker, R.A.; Chambers, J.M. (1985). Extending the S System. Pacific Grove, CA, USA: Wadsworth & Brooks/Cole. ISBN 0-534-05016-6.
- ^ Becker, R.A.; Chambers, J.M.; Wilks, A.R. (1988). The New S Language: A Programming Environment for Data Analysis and Graphics. Pacific Grove, CA, USA: Wadsworth & Brooks/Cole.ISBN 0-534-09192-X.
- ^ Chambers, J.M.; Hastie, T.J. (1991). Statistical Models in S. Pacific Grove, CA, USA: Wadsworth & Brooks/Cole. p. 624. ISBN 0-412-05291-1.
- ^ Wilkinsons, G.N.; Rogers, C.E. (1973). "Symbolic description of factorial models for analysis of variance". Applied Statistics 22 (3): 392–399. doi:10.2307/2346786. JSTOR 2346786.
External links[edit]
- Evolution of the S Language, by John M. Chambers, discusses the new features in Version 4 of S (in PostScript format)
- Stages in the Evolution of S, by John M. Chambers