How to draw a frequency polygon using R-console:
> age=scan()
1: 20
2: 24
3: 19
4: 24
5: 18
6: 19
7: 24
8: 22
9: 23
10: 19
11: 19
12: 24
13: 2
14: 21
15: 22
16: 23
17: 24
18: 21
19: 25
20: 23
21:
Read 20 items
> freq=table(age1)
> cumfreq=cumsum(freq)
> plot(freq, type="o", col=color)
plot(cumfreq, type="o", col=color)
> age=scan()
1: 20
2: 24
3: 19
4: 24
5: 18
6: 19
7: 24
8: 22
9: 23
10: 19
11: 19
12: 24
13: 2
14: 21
15: 22
16: 23
17: 24
18: 21
19: 25
20: 23
21:
Read 20 items
> freq=table(age1)
> cumfreq=cumsum(freq)
> plot(freq, type="o", col=color)
plot(cumfreq, type="o", col=color)
No comments:
Post a Comment