The R Project SVN R

Rev

Rev 10880 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10880 Rev 13053
Line 9... Line 9...
9
for (n1 in 1:7)
9
for (n1 in 1:7)
10
    print(zapsmall(polyroot(1:n1), digits = 10))
10
    print(zapsmall(polyroot(1:n1), digits = 10))
11
 
11
 
12
## fft():
12
## fft():
13
for(n in 1:30) cat("\nn=",n,":", round(fft(1:n), 8),"\n")
13
for(n in 1:30) cat("\nn=",n,":", round(fft(1:n), 8),"\n")
-
 
14
 
-
 
15
## lowess() {incl. sort, etc}:
-
 
16
options(digits = 5)
-
 
17
 
-
 
18
lowess(c(3,2,6,3,8,4))$y # this used to differ on Linux
-
 
19
 
-
 
20
y1 <- c(3,1:2,5:2,4,1:3,3)
-
 
21
lowess(y1)$y
-
 
22
lowess(y1, f = .4)$y
-
 
23
 
-
 
24
lowess(c(y1,100), f = .4)$y
-
 
25
 
-
 
26
## this is the test sample from Cleveland's original lowess.doc:
-
 
27
x <- c(1:5, rep(6,10),8,10,12,14,50)
-
 
28
y <- c(18,2,15,6,10,4,16,11,7,3,14,17,20,12,9,13,1,8,5,19)
-
 
29
lowess(x,y, f = .25, iter = 0, delta = 0)$y
-
 
30
lowess(x,y, f = .25, iter = 0, delta = 3)$y
-
 
31
lowess(x,y, f = .25, iter = 2, delta = 0)$y
-
 
32