> data()
> data(cars)
> cars
speed dist (3rd Column is Index)
1 4 2
2 4 10
3 7 4
4 7 22
5 8 16
6 9 10
7 10 18
> cars$speed
[1] 4 4 7 7 8 9 10 10 10 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 16 16 17
[30] 17 17 18 18 18 18 19 19 19 20 20 20 20 20 22 23 24 24 24 24 25
> cars$dist
[1] 2 10 4 22 16 10 18 26 34 17 28 14 20 24 28 26 34 34 46 26 36 60
[23] 80 20 26 54 32 40 32 40 50 42 56 76 84 36 46 68 32 48 52 56 64 66
[45] 54 70 92 93 120 85
> plot(cars$speed, cars$dist, xlab="speed",ylab="distance",main="car speed and stopping Distance")
> data(cars)
> cars
speed dist (3rd Column is Index)
1 4 2
2 4 10
3 7 4
4 7 22
5 8 16
6 9 10
7 10 18
> cars$speed
[1] 4 4 7 7 8 9 10 10 10 11 11 12 12 12 12 13 13 13 13 14 14 14 14 15 15 15 16 16 17
[30] 17 17 18 18 18 18 19 19 19 20 20 20 20 20 22 23 24 24 24 24 25
> cars$dist
[1] 2 10 4 22 16 10 18 26 34 17 28 14 20 24 28 26 34 34 46 26 36 60
[23] 80 20 26 54 32 40 32 40 50 42 56 76 84 36 46 68 32 48 52 56 64 66
[45] 54 70 92 93 120 85
> plot(cars$speed, cars$dist, xlab="speed",ylab="distance",main="car speed and stopping Distance")
No comments:
Post a Comment