Вы находитесь на странице: 1из 15

> datos=read.table("villavicencio1.

txt")
> attach(datos)
> datos
V1
1 NS/NR
2 igual
3 igual
4 igual
5 igual
6 igual
7 mejor
8 mejor
9 igual
10 mejor
11 peor
12 mejor
13 mejor
14 igual
15 igual
16 igual
17 peor
18 NS/NR
19 mejor
20 igual
21 igual
22 igual
23 igual
24 igual
25 igual
26 igual
27 igual
28 igual
29 igual
30 igual
31 igual
32 igual
33 igual
34 igual
35 igual
36 igual
37 mejor
38 mejor
39 NS/NR
40 NS/NR
41 mejor
42 igual
43 mejor
44 igual
45 igual
46 igual
47 mejor
48 igual
49 peor
50 mejor
51 NS/NR
52 igual
53 igual
54 NS/NR
55 peor
56 peor

57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116

mejor
igual
mejor
igual
NS/NR
mejor
mejor
mejor
peor
mejor
igual
peor
mejor
igual
peor
igual
mejor
igual
igual
igual
mejor
mejor
igual
NS/NR
NS/NR
mejor
mejor
igual
mejor
mejor
mejor
mejor
peor
mejor
mejor
mejor
igual
mejor
peor
igual
NS/NR
igual
igual
NS/NR
igual
igual
mejor
igual
igual
igual
NS/NR
peor
mejor
igual
igual
mejor
mejor
igual
igual
NS/NR

117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176

mejor
NS/NR
mejor
mejor
mejor
mejor
mejor
mejor
igual
mejor
peor
NS/NR
peor
mejor
mejor
peor
peor
igual
igual
peor
igual
igual
NS/NR
peor
igual
igual
igual
igual
igual
peor
peor
peor
peor
igual
mejor
mejor
mejor
igual
igual
mejor
igual
igual
mejor
igual
peor
igual
igual
igual
igual
NS/NR
mejor
igual
mejor
igual
igual
NS/NR
mejor
mejor
igual
igual

177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236

mejor
peor
peor
NS/NR
mejor
mejor
igual
mejor
peor
NS/NR
mejor
peor
mejor
mejor
mejor
mejor
igual
igual
igual
NS/NR
NS/NR
mejor
igual
igual
mejor
mejor
peor
peor
peor
igual
mejor
mejor
igual
NS/NR
igual
igual
igual
igual
mejor
mejor
peor
igual
mejor
mejor
NS/NR
mejor
NS/NR
mejor
igual
mejor
mejor
igual
mejor
igual
igual
igual
igual
mejor
mejor
mejor

237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296

mejor
igual
igual
igual
mejor
mejor
igual
igual
mejor
mejor
mejor
mejor
igual
peor
igual
mejor
mejor
mejor
peor
igual
igual
igual
mejor
peor
igual
igual
mejor
peor
mejor
mejor
igual
igual
NS/NR
mejor
mejor
mejor
mejor
mejor
mejor
igual
peor
NS/NR
mejor
igual
mejor
igual
mejor
NS/NR
mejor
igual
mejor
mejor
igual
mejor
mejor
igual
mejor
igual
mejor
peor

297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356

NS/NR
igual
NS/NR
igual
igual
mejor
igual
igual
NS/NR
igual
mejor
mejor
NS/NR
NS/NR
NS/NR
NS/NR
NS/NR
mejor
NS/NR
mejor
mejor
peor
mejor
mejor
mejor
mejor
mejor
mejor
igual
mejor
mejor
peor
mejor
mejor
mejor
mejor
mejor
mejor
igual
mejor
igual
igual
igual
mejor
igual
igual
igual
NS/NR
mejor
mejor
mejor
mejor
igual
peor
igual
igual
igual
igual
mejor
igual

357 igual
358 igual
359 igual
360 mejor
361 NS/NR
362 mejor
363 peor
364 igual
365 igual
366 igual
367 igual
368 igual
369 peor
370 NS/NR
371 peor
372 igual
373 NS/NR
374 igual
375 igual
376 mejor
377 igual
378 igual
379 mejor
380 NS/NR
381 mejor
382 mejor
383 mejor
>
> f=table(datos)
> f
datos
igual mejor NS/NR peor
154 145
42
42
> n=sum(f)
> n
[1] 383
> h=(f/n)*100
> h
datos
igual
mejor
NS/NR
peor
40.20888 37.85901 10.96606 10.96606
> F=cumsum(f)
> F
igual mejor NS/NR peor
154 299 341 383
> H=cumsum(h)
> H
igual
mejor
NS/NR
peor
40.20888 78.06789 89.03394 100.00000
> cbind(f,h,F,H)
f
h F
H
igual 154 40.20888 154 40.20888
mejor 145 37.85901 299 78.06789
NS/NR 42 10.96606 341 89.03394
peor 42 10.96606 383 100.00000
> barplot(f,col=c(2,3,4,5),names.arg=c(" "),main="DIAGRAMA DE BARRAS", ylab="Fre
cuencia absoluta",xlab=" ")
> legend(1,250,c("igual"," mejor"," NS/NR"," peor"), fill = c(2,3,4,5))
> barplot(f,space=5,col="blue",
+ + ylim=c(0,300),ylab="f",main="Grfico de Lneas: villavicencio")

Error: inesperado '=' in:


"barplot(f,space=5,col="blue",
+ ylim="
> ylim=c(0,300),ylab="f",main="Grfico de Lneas: Satisfaccion Vivienda")
Error: inesperado ',' in "ylim=c(0,300),"
> barplot(f,space=5,col="blue",
+ ylim=c(0,300),ylab="f",main="Grfico de Lneas: Satisfaccion Vivienda")
> abline(h=0)
> ylim=c(0,300),ylab="f",main="Grfico de Lneas: ")
Error: inesperado ',' in "ylim=c(0,300),"
> ylim=c(0,300),ylab="f",main="Grfico de Lneas: 49")
Error: inesperado ',' in "ylim=c(0,300),"
> ylim=c(0,400),ylab="f",main="Grfico de Lneas: 49")
Error: inesperado ',' in "ylim=c(0,400),"
> pie(h,col=c(2,3,4,5),main="GRAFICO CIRCULAR")
> plot.ecdf(H,main="distribucin acumulada")
> datos=read.table("villavicencio.txt")
> attach(datos)
The following object is masked from datos (pos = 3):
V1
> datos
V1
1
3
2
1
3
1
4
1
5
1
6
1
7
2
8
2
9
1
10
2
11
0
12
2
13
2
14
1
15
1
16
1
17
0
18
3
19
2
20
1
21
1
22
1
23
1
24
1
25
1
26
1
27
1
28
1
29
1
30
1
31
1
32
1
33
1
34
1
35
1
36
1

37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96

2
2
3
3
2
1
2
1
1
1
2
1
0
2
3
1
1
3
0
0
2
1
2
1
3
2
2
2
0
2
1
0
2
1
0
1
2
1
1
1
2
2
1
3
3
2
2
1
NS/NR
NS/NR
NS/NR
NS/NR
2
2
2
2
0
2
2
2

97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156

1
2
0
1
3
1
1
3
1
1
2
1
1
1
3
0
2
1
1
2
2
1
1
3
2
3
2
2
2
NS/NR
2
2
2
1
NS/NR
NS/NR
NS/NR
NS/NR
2
0
3
0
2
2
0
0
1
1
0
1
1
3
0
1
1
1
1
1
0
0

157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216

0
0
1
2
2
2
1
1
2
1
1
2
1
0
1
1
1
1
3
2
1
2
1
1
3
2
2
1
1
2
0
0
3
2
2
1
2
0
3
2
0
2
2
2
2
1
1
1
3
3
2
1
1
2
2
0
0
0
1
2

217
2
218
1
219
3
220
1
221
1
222
1
223
1
224
2
225
2
226
0
227
1
228
2
229
2
230
3
231
2
232
3
233 NS/NR
234
2
235
1
236
2
237
2
238
1
239
2
240
1
241
1
242
1
243
1
244
2
245
2
246
2
247
2
248
1
249
1
250
1
251
2
252
2
253
1
254
1
255
2
256
2
257
2
258
2
259
1
260
0
261
1
262
2
263
2
264
2
265
0
266
1
267
1
268
1
269
2
270
0
271
1
272
1
273
2
274
0
275
2
276
2

277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336

1
1
3
2
2
2
2
2
2
1
0
3
2
1
2
1
2
3
2
1
2
2
1
2
2
1
2
1
2
0
3
1
3
1
1
2
1
1
3
1
2
2
3
3
3
3
3
2
3
2
2
0
2
2
2
2
2
2
1
2

337
2
338
0
339
2
340
2
341
2
342
2
343
2
344
2
345
1
346
2
347
1
348
1
349
1
350
2
351
1
352
1
353
1
354
3
355
2
356
2
357
2
358
2
359
1
360
0
361
1
362
1
363
1
364
1
365
2
366
1
367
1
368
1
369
1
370
2
371
3
372
2
373
0
374
1
375
1
376
1
377
1
378
1
379
0
380
3
381
0
382
1
383
3
384
1
385
1
386
2
387
1
388
1
389
2
390
3
391
2
392
2
393
2
> f=table(datos)
> f
datos

0
1
2
3 NS/NR
42 154 145
42
10
> n=sum(f)
> h=(f/n)*100
> F=cumsum(f)
> H=cumsum(h)
> cbind(f,h,F,H)
f
h F
H
0
42 10.687023 42 10.68702
1
154 39.185751 196 49.87277
2
145 36.895674 341 86.76845
3
42 10.687023 383 97.45547
NS/NR 10 2.544529 393 100.00000
> summary(datos)
V1
0
: 42
1
:154
2
:145
3
: 42
NS/NR: 10
> boxplot(datos, main="Numero de personas", xlab="Personas", ylab="villavicencio
")
> datos1=c(3,1,1,1,1,1,2,2,1,2,0,2,2,1,1,1,0,3,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
,1,2,2,3,3,2,1,2,1,1,1,2,1,0,2,3,1,1,3,0,0,2,1,2,1,3,2,2,2,0,2,1,0,2,1,0,1,2,1,1
,1,2,2,1,3,3,2,2,1,2,2,2,2,0,2,2,2,1,2,0,1,3,1,1,3,1,1,2,1,1,1,3,0,2,1,1,2,2,1,1
,3,2,3,2,2,2,2,2,2,1,2,0,3,0,2,2,0,0,1,1,0,1,1,3,0,1,1,1,1,1,0,0,0,0,1,2,2,2,1,1
,2,1,1,2,1,0,1,1,1,1,3,2,1,2,1,1,3,2,2,1,1,2,0,0,3,2,2,1,2,0,3,2,0,2,2,2,2,1,1,1
,3,3,2,1,1,2,2,0,0,0,1,2,2,1,3,1,1,1,1,2,2,0,1,2,2,3,2,3,2,1,2,2,1,2,1,1,1,1,2,2
,2,2,1,1,1,2,2,1,1,2,2,2,2,1,0,1,2,2,2,0,1,1,1,2,0,1,1,2,0,2,2,1,1,3,2,2,2,2,2,2
,1,0,3,2,1,2,1,2,3,2,1,2,2,1,2,2,1,2,1,2,0,3,1,3,1,1,2,1,1,3,1,2,2,3,3,3,3,3,2,3
,2,2,0,2,2,2,2,2,2,1,2,2,0,2,2,2,2,2,2,1,2,1,1,1,2,1,1,1,3,2,2,2,2,1,0,1,1,1,1,2
,1,1,1,1,2,3,2,0,1,1,1,1,1,0,3,0,1,3,1,1,2,1,1,2,3,2,2,2)
> quantile(datos1, prob = seq(0, 1, length = 11), type = 5)
0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100%
0
0
1
1
1
1
2
2
2
3
3
> quantile(datos1)
0% 25% 50% 75% 100%
0
1
1
2
3
> quantile(datos1, prob = c(0.05,0.10,0.15,0.20,0.25,0.30,0.35,0.40,0.45,0.50,0.
55,0.60,0.65,0.70,0.75,0.80,0.85,0.90,0.95,1))
5% 10% 15% 20% 25% 30% 35% 40% 45% 50% 55% 60% 65% 70% 75% 80%
0
0
1
1
1
1
1
1
1
1
2
2
2
2
2
2
85% 90% 95% 100%
2
3
3
3
> quantile(datos1, prob = c(0.2,0.4,0.6,0.8,1))
20% 40% 60% 80% 100%
1
1
2
2
3
>

Вам также может понравиться