~ubuntu-branches/ubuntu/natty/ess/natty

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
\documentclass{article}
\usepackage{noweb}

\begin{document}

For example, plotting 20 pairs of $N(0,1)$ random variates can be
looked at via the two following chunks.

<<Plotting 20 N(0,1) RVs in XLispStat>>=
;; -*- mode: xlispstat -*-
(def test (normal-rand 20))
(def test2 (normal-rand 20))
(plot test test2)
@ 

The below code demonstrates that there isn't much difference between
Lisp and the S language (as implemented through the dialect, R).

<<Plotting 20 N(0,1) RVs in R>>=
## -*- mode: R -*-
test <- rnorm(20)
test2 <- rnorm(20)
plot(test,test2)
@ 

Finally, we could show how to do this in Stata or SAS, as follows:

<<Plotting 20 N(0,1) RVs in R>>=
gen test = normal(20)
gen test2 = normal(20)
plot test,test2
@ 

\end{document}