(ess-sqpe-versions-created): Use ess-newest-r.
[ess.git] / LDA / ex1.nw
blobee938a6c97abbd756b4324faf382ef3d15132d3a
1 \documentclass{article}
2 \usepackage{noweb}
4 \begin{document}
6 For example, plotting 20 pairs of $N(0,1)$ random variates can be
7 looked at via the two following chunks.
9 <<Plotting 20 N(0,1) RVs in XLispStat>>=
10 ;; -*- mode: xlispstat -*-
11 (def test (normal-rand 20))
12 (def test2 (normal-rand 20))
13 (plot test test2)
14
16 The below code demonstrates that there isn't much difference between
17 Lisp and the S language (as implemented through the dialect, R).
19 <<Plotting 20 N(0,1) RVs in R>>=
20 ## -*- mode: R -*-
21 test <- rnorm(20)
22 test2 <- rnorm(20)
23 plot(test,test2)
24
26 Finally, we could show how to do this in Stata or SAS, as follows:
28 <<Plotting 20 N(0,1) RVs in R>>=
29 gen test = normal(20)
30 gen test2 = normal(20)
31 plot test,test2
32
34 \end{document}