[R-br] ordenar linhas, separar elementos e contar elementos

Augusto Ribas ribas.aca em gmail.com
Segunda Fevereiro 25 08:44:44 BRT 2013


Eu acho que tem no guia de postagem para não postar anexos para a lista.
Ainda sim é ruim, ja que eu tenho que baixar o arquivo, mudar diretorio
etc. a solução com dput e copia e cola ainda é mais rapida, no fim do
e-mail eu mostro como seria a saida com dput. Mas veja so:

#primeiro eu li os dados, o separado parecia ser barra, e tens uns t no
meio dos dados, eu não entendi o formato direito.
#lendo os dados
> dados<-read.table("exemplo.txt",sep = "/")
#usando o comando str para ver como são os dados, olhe que tudo são fatores
> str(dados)
'data.frame':    50 obs. of  11 variables:
 $ Municípios             : Factor w/ 50 levels "tAraucária - PR",..: 45 35
6 15 4 26 32 20 18 36 ...
 $ tPopulação..2010.      : Factor w/ 50 levels
"t1.014.837","t1.080.113",..: 3 7 21 12 16 13 10 6 20 35 ...
 $ tRanking.populacional  : Factor w/ 50 levels "t103º","t105º",..: 15 21
39 49 46 12 17 6 45 32 ...
 $ tPIB.2006..R..1.000.   : Factor w/ 50 levels "t  10 161 750",..: 26 10
46 30 31 29 28 25 19 23 ...
 $ tPIB.2007..R..1.000.   : Factor w/ 50 levels "t  10 402 706",..: 30 13
50 33 34 32 31 27 21 26 ...
 $ tPIB.2008..R..1.000.   : Factor w/ 50 levels "t  10 169 929",..: 37 21 7
41 40 39 38 36 30 33 ...
 $ tPIB.2009..R..1.000.   : Factor w/ 50 levels "t  10 257 022",..: 38 21 9
41 40 39 37 35 32 36 ...
 $ tPIB.2010..R..1.000.   : Factor w/ 50 levels "t  10 340 756",..: 47 29
16 50 49 48 46 45 44 43 ...
 $ tRanking.PIB           : Factor w/ 50 levels "t10º","t11º",..: 11 22 33
44 46 47 48 49 50 1 ...
 $ tPIB.per.capita..R..   : Factor w/ 50 levels "t   103 403,99",..: 36 24
45 26 16 19 28 25 10 8 ...
 $ tRanking.PIB.per.capita: Factor w/ 50 levels "t1.024º","t1.039º",..: 4
26 40 24 39 32 22 25 5 9 ...

#para ficar mais facil, eu vou separar a coluna 11 em um vetor chamado pib
> pib<-dados[,11]
#pib é um fator
> class(pib)
[1] "factor"
#eu sou ruim de expressão regular, mas primeiro vamos tirar os t, os ponto
e outras coisas e transformar em numeros
> pib<-gsub("t","",pib)
> pib<-gsub("º","",pib)
> pib<-gsub("\\.","",pib)
> pib<-as.numeric(pib)

#Agora temos numeros
> pib
 [1]  141  288   69  282  646  386  277  284 1446 1749  203   75  104
811   47   14   59  264   74   45  892
[22]  153   77  271  175  281 1969 1024  446  347   93  364   22  174   34
1039   87   73  260   21 1946 1488
[43]   76  309  557  766   49  291 1963 2662
> class(pib)
[1] "numeric"

#vamos usar agora o pib para criar um vetor chamado ordem, que é a ordem
dos valores, usamos o argumento decreaseing para que seja do maior para o
#menor
> ordem<-order(pib,decreasing = T)

#ai eu olho os dados, usando ordem para definir a ordem que as linhas são
mostradas
> dados[ordem,]
                    Municípios tPopulação..2010. tRanking.populacional
tPIB.2006..R..1.000.
50           tSão Gonçalo - RJ          t999.728
t16º         t  6 885 641
27                 tBelém - AL            t4.551
t4.442º        t  12 520 258
49              tTeresina - PI          t814.230
t19º         t  5 989 117
41             tMacedônia - SP            t3.664
t4.807º         t  7 267 950
10          tSalto Veloso - SC            t4.301
t4.539º        t  24 139 423
42             tNarandiba - SP            t4.288
t4.547º         t  7 398 852
9              tFortaleza - CE        t2.452.185
t5º        t  22 331 722
36          tCampo Grande - AL            t9.032
t3.160º         t  7 817 007
28              tSão Luís - MA        t1.014.837
t15º        t  11 204 463
21               tGoiânia - GO        t1.302.001
t12º        t  15 898 437
14              tRebouças - PR           t14.176
t2.280º        t  18 316 659
46                tCuiabá - MT          t551.098
t35º         t  7 177 404
5         tBelo Horizonte - MG        t2.375.151
t6º        t  32 473 102
45        tNísia Floresta - RN           t23.784
t1.386º         t  7 466 738
29           tSanto André - PB            t2.638
t5.223º        t  11 674 114
6                 tManari - PE           t18.083
t1.831º        t  31 801 795
32              tSorocaba - SP          t586.625
t32º        t  10 161 750
30        tRibeirão Pires - SP          t113.068
t232º        t  11 326 627
44               tDiadema - SP          t386.089
t55º         t  7 747 560
48              tPiracema - MG            t6.406
t3.804º         t  6 815 596
2          tRio de Contas - BA           t13.007
t2.462º       t  128 026 084
8              tGuarulhos - SP        t1.221.979
t13º        t  25 697 978
4               tCuritiba - PR        t1.751.907
t8º        t  32 182 599
26            tUberlândia - MG          t604.013
t30º        t  10 344 790
7             tPorto Acre - AC           t14.880
t2.184º        t  30 130 789
24              tContagem - MG          t603.442
t31º        t  11 314 821
18       tDuque de Caxias - RJ          t855.048
t18º        t  22 435 604
39                 tSerra - ES          t409.267
t51º         t  9 130 483
11              tCampinas - SP        t1.080.113
t14º        t  23 629 697
25                  tJóia - RS            t8.331
t3.300º        t  10 697 887
34         tCaxias do Sul - RS          t435.564
t45º         t  8 607 676
22   tSão José dos Campos - SP          t629.921
t28º        t  15 522 240
1              tSão Paulo - SP       t11.253.503
t1º       t  282 892 455
13 tSão Bernardo do Campo - SP          t765.463
t23º        t  20 566 795
31                tCanoas - RS          t323.827
t72º         t  9 596 231
37  tSão José dos Pinhais - PR          t264.210
t90º         t  7 029 321
23                tJundiá - RN            t3.582
t4.841º        t  11 313 752
43           tLuzinópolis - TO            t2.622
t5.235º         t  6 477 109
12            tOrtigueira - PR           t23.380
t1.396º        t  17 798 886
19 tCampos dos Goytacazes - RJ          t463.731
t42º        t  23 134 307
38              tCamaçari - BA          t242.970
t103º         t  9 529 357
3               tBrasília - DF        t2.570.160
t4º        t  89 628 553
17                tSantos - SP          t419.400
t48º        t  16 141 388
47    tSão Caetano do Sul - SP          t149.263
t178º         t  9 378 204
15                 tBetim - MG          t378.089
t57º        t  18 807 187
20               tVitória - ES          t327.801
t70º        t  16 476 046
35                tItajaí - SC          t183.373
t149º         t  6 297 432
33                 tParaú - RN            t3.859
t4.726º         t  2 997 778
40             tAraucária - PR          t119.123
t217º         t  8 436 380
16               tBarueri - SP          t240.749
t105º        t  25 570 470
   tPIB.2007..R..1.000. tPIB.2008..R..1.000. tPIB.2009..R..1.000.
tPIB.2010..R..1.000. tRanking.PIB
50         t  7 410 667         t  8 267 153         t  9 034 995        t
10 340 756         t50º
27        t  13 842 632        t  15 286 066        t  16 568 144        t
17 987 323         t27º
49         t  6 536 373         t  7 505 653         t  8 688 475        t
10 539 378         t49º
41         t  8 510 435         t  9 125 210        t  10 257 022        t
12 114 090         t41º
10        t  26 772 417        t  29 393 081        t  33 131 342        t
36 744 670         t10º
42         t  8 020 993         t  8 858 669        t  10 362 496        t
11 997 401         t42º
9         t  24 476 378        t  28 769 259        t  31 373 473        t
37 106 309          t9º
36         t  8 956 501        t  10 460 818        t  11 640 898        t
13 875 046         t36º
28        t  12 272 006        t  14 720 891        t  15 323 512        t
17 915 048         t28º
21        t  17 845 701        t  19 456 021        t  21 380 256        t
24 445 744         t21º
14        t  20 689 607        t  22 470 886        t  24 720 436        t
30 032 003         t14º
46         t  7 897 532         t  8 951 985         t  9 819 382        t
11 051 628         t46º
5         t  38 285 100        t  42 255 583        t  44 729 413        t
51 661 760          t5º
45         t  8 853 442         t  9 293 714         t  9 904 464        t
11 214 103         t45º
29        t  13 259 022        t  13 303 110        t  14 709 216        t
17 258 468         t29º
6         t  34 384 768        t  38 028 945        t  40 482 809        t
48 598 153          t6º
32        t  11 913 720        t  13 046 652        t  14 143 601        t
16 127 236         t32º
30        t  12 911 809        t  13 843 411        t  14 686 950        t
17 004 019         t30º
44         t  8 621 541         t  9 311 666         t  9 969 627        t
11 254 523         t44º
48         t  7 678 195         t  8 832 622         t  9 599 600        t
10 931 268         t48º
2        t  140 094 694       t  158 757 286       t  170 517 226       t
190 249 043          t2º
8         t  27 558 277        t  31 936 895        t  32 475 487        t
37 139 404          t8º
4         t  38 124 861        t  43 354 307        t  45 741 463        t
53 106 497          t4º
26        t  12 499 059        t  14 253 571        t  16 092 093        t
18 286 904         t26º
7         t  33 590 020        t  35 844 547        t  36 873 055        t
43 038 100          t7º
24        t  12 340 154        t  14 963 434        t  15 327 435        t
18 539 693         t24º
18        t  28 321 333        t  18 672 981        t  24 473 664        t
26 496 845         t18º
39        t  10 402 706        t  10 801 039        t  11 520 289        t
12 703 017         t39º
11        t  26 767 620        t  29 303 152        t  31 653 414        t
36 688 629         t11º
25        t  11 462 068        t  13 219 945        t  13 349 588        t
18 473 990         t25º
34         t  9 789 217        t  11 804 006        t  12 265 677        t
15 692 359         t34º
22        t  17 636 864        t  20 700 680        t  22 015 096        t
24 117 145         t22º
1        t  323 154 666       t  356 980 045       t  389 284 929       t
443 600 102          t1º
13        t  25 164 098        t  29 981 271        t  28 935 628        t
35 578 586         t13º
31        t  10 763 588        t  14 783 276        t  16 237 175        t
16 547 966         t31º
37         t  8 524 230        t  10 397 115        t  11 508 519        t
13 690 888         t37º
23        t  13 992 935        t  15 168 172        t  16 584 964        t
20 124 600         t23º
43         t  6 396 606        t  12 969 186         t  9 442 184        t
11 267 976         t43º
12        t  24 619 373        t  30 067 523        t  31 617 716        t
36 389 080         t12º
19        t  20 811 798        t  29 206 675        t  20 157 567        t
25 313 179         t19º
38        t  10 405 593        t  11 844 962        t  13 615 507        t
13 379 554         t38º
3         t  99 945 620       t  117 571 878       t  131 487 268       t
149 906 319          t3º
17        t  19 506 667        t  24 557 091        t  22 546 298        t
27 616 035         t17º
47         t  8 900 640        t  10 187 641         t  8 918 069        t
11 009 306         t47º
15        t  21 522 757        t  25 281 114        t  24 974 495        t
28 297 360         t15º
20        t  19 152 858        t  23 117 059        t  19 747 492        t
24 969 295         t20º
35         t  7 982 909        t  10 169 929        t  10 889 035        t
15 235 108         t35º
33         t  3 074 977         t  6 568 760         t  5 634 291        t
15 918 216         t33º
40         t  9 547 958        t  11 019 940        t  11 969 256        t
12 371 028         t40º
16        t  26 076 920        t  27 143 412        t  26 909 802        t
27 752 428         t16º
   tPIB.per.capita..R.. tRanking.PIB.per.capita
50        t   10 341,78                 t2.662º
27        t   12 921,64                 t1.969º
49        t   12 940,66                 t1.963º
41        t   12 989,48                 t1.946º
10        t   13 728,08                 t1.749º
42        t   14 925,65                 t1.488º
9         t   15 161,47                 t1.446º
36        t   17 625,73                 t1.039º
28        t   17 703,61                 t1.024º
21        t   18 777,09                   t892º
14        t   19 540,20                   t811º
46        t   20 044,67                   t766º
5         t   21 748,25                   t646º
45        t   23 011,46                   t557º
29        t   25 609,30                   t446º
6         t   26 961,15                   t386º
32        t   27 506,28                   t364º
30        t   28 100,52                   t347º
44        t   29 153,85                   t309º
48        t   29 959,19                   t291º
2         t   30 088,24                   t288º
8         t   30 383,43                   t284º
4         t   30 400,49                   t282º
26        t   30 463,70                   t281º
7         t   30 524,80                   t277º
24        t   30 743,31                   t271º
18        t   30 988,80                   t264º
39        t   31 034,14                   t260º
11        t   33 939,56                   t203º
25        t   35 854,42                   t175º
34        t   36 034,46                   t174º
22        t   38 431,00                   t153º
1         t   39 450,87                   t141º
13        t   46 495,62                   t104º
31        t   51 070,03                    t93º
37        t   51 960,20                    t87º
23        t   54 353,94                    t77º
43        t   54 501,02                    t76º
12        t   54 599,81                    t75º
19        t   54 607,81                    t74º
38        t   55 063,52                    t73º
3         t   58 489,46                    t69º
17        t   65 790,53                    t59º
47        t   73 605,89                    t49º
15        t   74 950,56                    t47º
20        t   76 721,66                    t45º
35        t   83 075,82                    t34º
33       t   103 403,99                    t22º
40       t   103 777,70                    t21º
16       t   115 319,91                    t14º

#depois disso é simples, eu posso seprar somente os primeiros 10 valores,
ou 100 apresentar
> dados[ordem[1:10],]
           Municípios tPopulação..2010. tRanking.populacional
tPIB.2006..R..1.000. tPIB.2007..R..1.000.
50  tSão Gonçalo - RJ          t999.728                  t16º         t  6
885 641         t  7 410 667
27        tBelém - AL            t4.551               t4.442º        t  12
520 258        t  13 842 632
49     tTeresina - PI          t814.230                  t19º         t  5
989 117         t  6 536 373
41    tMacedônia - SP            t3.664               t4.807º         t  7
267 950         t  8 510 435
10 tSalto Veloso - SC            t4.301               t4.539º        t  24
139 423        t  26 772 417
42    tNarandiba - SP            t4.288               t4.547º         t  7
398 852         t  8 020 993
9     tFortaleza - CE        t2.452.185                   t5º        t  22
331 722        t  24 476 378
36 tCampo Grande - AL            t9.032               t3.160º         t  7
817 007         t  8 956 501
28     tSão Luís - MA        t1.014.837                  t15º        t  11
204 463        t  12 272 006
21      tGoiânia - GO        t1.302.001                  t12º        t  15
898 437        t  17 845 701
   tPIB.2008..R..1.000. tPIB.2009..R..1.000. tPIB.2010..R..1.000.
tRanking.PIB tPIB.per.capita..R..
50         t  8 267 153         t  9 034 995        t  10 340 756
t50º        t   10 341,78
27        t  15 286 066        t  16 568 144        t  17 987 323
t27º        t   12 921,64
49         t  7 505 653         t  8 688 475        t  10 539 378
t49º        t   12 940,66
41         t  9 125 210        t  10 257 022        t  12 114 090
t41º        t   12 989,48
10        t  29 393 081        t  33 131 342        t  36 744 670
t10º        t   13 728,08
42         t  8 858 669        t  10 362 496        t  11 997 401
t42º        t   14 925,65
9         t  28 769 259        t  31 373 473        t  37 106 309
t9º        t   15 161,47
36        t  10 460 818        t  11 640 898        t  13 875 046
t36º        t   17 625,73
28        t  14 720 891        t  15 323 512        t  17 915 048
t28º        t   17 703,61
21        t  19 456 021        t  21 380 256        t  24 445 744
t21º        t   18 777,09
   tRanking.PIB.per.capita
50                 t2.662º
27                 t1.969º
49                 t1.963º
41                 t1.946º
10                 t1.749º
42                 t1.488º
9                  t1.446º
36                 t1.039º
28                 t1.024º
21                   t892º

#ou eu inverto a ordem com rev, que é a mesma cosia que usar o comando
order decreaseing = false, e vejo os 10 primerios valores
> dados[rev(ordem)[1:10],]
                 Municípios tPopulação..2010. tRanking.populacional
tPIB.2006..R..1.000. tPIB.2007..R..1.000.
16            tBarueri - SP          t240.749                 t105º
t  25 570 470        t  26 076 920
40          tAraucária - PR          t119.123                 t217º
t  8 436 380         t  9 547 958
33              tParaú - RN            t3.859               t4.726º
t  2 997 778         t  3 074 977
35             tItajaí - SC          t183.373                 t149º
t  6 297 432         t  7 982 909
20            tVitória - ES          t327.801                  t70º
t  16 476 046        t  19 152 858
15              tBetim - MG          t378.089                  t57º
t  18 807 187        t  21 522 757
47 tSão Caetano do Sul - SP          t149.263                 t178º
t  9 378 204         t  8 900 640
17             tSantos - SP          t419.400                  t48º
t  16 141 388        t  19 506 667
3            tBrasília - DF        t2.570.160                   t4º
t  89 628 553        t  99 945 620
38           tCamaçari - BA          t242.970                 t103º
t  9 529 357        t  10 405 593
   tPIB.2008..R..1.000. tPIB.2009..R..1.000. tPIB.2010..R..1.000.
tRanking.PIB tPIB.per.capita..R..
16        t  27 143 412        t  26 909 802        t  27 752 428
t16º       t   115 319,91
40        t  11 019 940        t  11 969 256        t  12 371 028
t40º       t   103 777,70
33         t  6 568 760         t  5 634 291        t  15 918 216
t33º       t   103 403,99
35        t  10 169 929        t  10 889 035        t  15 235 108
t35º        t   83 075,82
20        t  23 117 059        t  19 747 492        t  24 969 295
t20º        t   76 721,66
15        t  25 281 114        t  24 974 495        t  28 297 360
t15º        t   74 950,56
47        t  10 187 641         t  8 918 069        t  11 009 306
t47º        t   73 605,89
17        t  24 557 091        t  22 546 298        t  27 616 035
t17º        t   65 790,53
3        t  117 571 878       t  131 487 268       t  149 906 319
t3º        t   58 489,46
38        t  11 844 962        t  13 615 507        t  13 379 554
t38º        t   55 063,52
   tRanking.PIB.per.capita
16                    t14º
40                    t21º
33                    t22º
35                    t34º
20                    t45º
15                    t47º
47                    t49º
17                    t59º
3                     t69º
38                    t73º

#Agora por ultimo, vc deveria postar essa saida aqui, veja que se vc
colocar isso aqui na mensagem, eu posso copiar e colar no R, e olhar os
dados.
Isso é melhor para a lista, ja que fica sem trafego de arquivos, não tem
perigo de alguem enviar arquivos com intenções escusas, para quem vai
ajudar a distancia de olhar os dados é um crtl c crtl v, e vc ve as pessoas
dandos soluções para o seu conjunto de dados, não chutando uma solução que
pode não te servir e te manter com duvidas.

Bem espero ter ajudado, abraços
> dput(dados)
structure(list(Municípios = structure(c(45L, 35L, 6L, 15L, 4L,
26L, 32L, 20L, 18L, 36L, 8L, 29L, 39L, 33L, 5L, 2L, 38L, 17L,
10L, 50L, 19L, 42L, 23L, 13L, 22L, 49L, 3L, 44L, 37L, 34L, 11L,
47L, 30L, 12L, 21L, 9L, 43L, 7L, 46L, 1L, 25L, 27L, 24L, 16L,
28L, 14L, 40L, 31L, 48L, 41L), .Label = c("tAraucária - PR",
"tBarueri - SP", "tBelém - AL", "tBelo Horizonte - MG", "tBetim - MG",
"tBrasília - DF", "tCamaçari - BA", "tCampinas - SP", "tCampo Grande - AL",
"tCampos dos Goytacazes - RJ", "tCanoas - RS", "tCaxias do Sul - RS",
"tContagem - MG", "tCuiabá - MT", "tCuritiba - PR", "tDiadema - SP",
"tDuque de Caxias - RJ", "tFortaleza - CE", "tGoiânia - GO",
"tGuarulhos - SP", "tItajaí - SC", "tJóia - RS", "tJundiá - RN",
"tLuzinópolis - TO", "tMacedônia - SP", "tManari - PE", "tNarandiba - SP",
"tNísia Floresta - RN", "tOrtigueira - PR", "tParaú - RN",
"tPiracema - MG", "tPorto Acre - AC", "tRebouças - PR", "tRibeirão Pires -
SP",
"tRio de Contas - BA", "tSalto Veloso - SC", "tSanto André - PB",
"tSantos - SP", "tSão Bernardo do Campo - SP", "tSão Caetano do Sul - SP",
"tSão Gonçalo - RJ", "tSão José dos Campos - SP", "tSão José dos Pinhais -
PR",
"tSão Luís - MA", "tSão Paulo - SP", "tSerra - ES", "tSorocaba - SP",
"tTeresina - PI", "tUberlândia - MG", "tVitória - ES"), class = "factor"),
    tPopulação..2010. = structure(c(3L, 7L, 21L, 12L, 16L,
    13L, 10L, 6L, 20L, 35L, 2L, 15L, 45L, 9L, 29L, 18L, 33L,
    48L, 38L, 26L, 8L, 43L, 27L, 41L, 47L, 42L, 37L, 1L, 23L,
    4L, 25L, 40L, 30L, 36L, 14L, 49L, 24L, 19L, 32L, 5L, 28L,
    34L, 22L, 31L, 17L, 39L, 11L, 44L, 46L, 50L), .Label = c("t1.014.837",
    "t1.080.113", "t11.253.503", "t113.068", "t119.123", "t1.221.979",
    "t13.007", "t1.302.001", "t14.176", "t14.880", "t149.263",
    "t1.751.907", "t18.083", "t183.373", "t23.380", "t2.375.151",
    "t23.784", "t240.749", "t242.970", "t2.452.185", "t2.570.160",
    "t2.622", "t2.638", "t264.210", "t323.827", "t327.801", "t3.582",
    "t3.664", "t378.089", "t3.859", "t386.089", "t409.267", "t419.400",
    "t4.288", "t4.301", "t435.564", "t4.551", "t463.731", "t551.098",
    "t586.625", "t603.442", "t604.013", "t629.921", "t6.406",
    "t765.463", "t814.230", "t8.331", "t855.048", "t9.032", "t999.728"
    ), class = "factor"), tRanking.populacional = structure(c(15L,
    21L, 39L, 49L, 46L, 12L, 17L, 6L, 45L, 32L, 8L, 5L, 20L,
    18L, 44L, 2L, 38L, 13L, 30L, 47L, 3L, 22L, 37L, 25L, 27L,
    23L, 31L, 9L, 41L, 19L, 48L, 26L, 35L, 34L, 7L, 24L, 50L,
    1L, 40L, 16L, 36L, 33L, 42L, 43L, 4L, 28L, 11L, 29L, 14L,
    10L), .Label = c("t103º", "t105º", "t12º", "t1.386º",
    "t1.396º", "t13º", "t149º", "t14º", "t15º", "t16º",
    "t178º", "t1.831º", "t18º", "t19º", "t1º", "t217º",
    "t2.184º", "t2.280º", "t232º", "t23º", "t2.462º", "t28º",
    "t30º", "t3.160º", "t31º", "t32º", "t3.300º", "t35º",
    "t3.804º", "t42º", "t4.442º", "t4.539º", "t4.547º",
    "t45º", "t4.726º", "t4.807º", "t4.841º", "t48º", "t4º",
    "t51º", "t5.223º", "t5.235º", "t55º", "t57º", "t5º",
    "t6º", "t70º", "t72º", "t8º", "t90º"), class = "factor"),
    tPIB.2006..R..1.000. = structure(c(26L, 10L, 46L, 30L, 31L,
    29L, 28L, 25L, 19L, 23L, 22L, 15L, 18L, 16L, 17L, 24L, 13L,
    20L, 21L, 14L, 12L, 11L, 5L, 6L, 3L, 2L, 9L, 4L, 8L, 7L,
    50L, 1L, 27L, 45L, 33L, 43L, 37L, 49L, 47L, 44L, 39L, 40L,
    34L, 42L, 41L, 38L, 48L, 35L, 32L, 36L), .Label = c("t  10 161 750",
    "t  10 344 790", "t  10 697 887", "t  11 204 463", "t  11 313 752",
    "t  11 314 821", "t  11 326 627", "t  11 674 114", "t  12 520 258",
    "t  128 026 084", "t  15 522 240", "t  15 898 437", "t  16 141 388",
    "t  16 476 046", "t  17 798 886", "t  18 316 659", "t  18 807 187",
    "t  20 566 795", "t  22 331 722", "t  22 435 604", "t  23 134 307",
    "t  23 629 697", "t  24 139 423", "t  25 570 470", "t  25 697 978",
    "t  282 892 455", "t  2 997 778", "t  30 130 789", "t  31 801 795",
    "t  32 182 599", "t  32 473 102", "t  5 989 117", "t  6 297 432",
    "t  6 477 109", "t  6 815 596", "t  6 885 641", "t  7 029 321",
    "t  7 177 404", "t  7 267 950", "t  7 398 852", "t  7 466 738",
    "t  7 747 560", "t  7 817 007", "t  8 436 380", "t  8 607 676",
    "t  89 628 553", "t  9 130 483", "t  9 378 204", "t  9 529 357",
    "t  9 596 231"), class = "factor"), tPIB.2007..R..1.000. =
structure(c(30L,
    13L, 50L, 33L, 34L, 32L, 31L, 27L, 21L, 26L, 25L, 22L, 23L,
    18L, 20L, 24L, 17L, 28L, 19L, 16L, 15L, 14L, 12L, 7L, 4L,
    8L, 11L, 6L, 10L, 9L, 3L, 5L, 29L, 49L, 40L, 47L, 43L, 2L,
    1L, 48L, 42L, 41L, 35L, 44L, 45L, 39L, 46L, 38L, 36L, 37L
    ), .Label = c("t  10 402 706", "t  10 405 593", "t  10 763 588",
    "t  11 462 068", "t  11 913 720", "t  12 272 006", "t  12 340 154",
    "t  12 499 059", "t  12 911 809", "t  13 259 022", "t  13 842 632",
    "t  13 992 935", "t  140 094 694", "t  17 636 864", "t  17 845 701",
    "t  19 152 858", "t  19 506 667", "t  20 689 607", "t  20 811 798",
    "t  21 522 757", "t  24 476 378", "t  24 619 373", "t  25 164 098",
    "t  26 076 920", "t  26 767 620", "t  26 772 417", "t  27 558 277",
    "t  28 321 333", "t  3 074 977", "t  323 154 666", "t  33 590 020",
    "t  34 384 768", "t  38 124 861", "t  38 285 100", "t  6 396 606",
    "t  6 536 373", "t  7 410 667", "t  7 678 195", "t  7 897 532",
    "t  7 982 909", "t  8 020 993", "t  8 510 435", "t  8 524 230",
    "t  8 621 541", "t  8 853 442", "t  8 900 640", "t  8 956 501",
    "t  9 547 958", "t  9 789 217", "t  99 945 620"), class = "factor"),
    tPIB.2008..R..1.000. = structure(c(37L, 21L, 7L, 41L, 40L,
    39L, 38L, 36L, 30L, 33L, 32L, 35L, 34L, 25L, 28L, 29L, 27L,
    22L, 31L, 26L, 23L, 24L, 19L, 18L, 12L, 15L, 20L, 16L, 13L,
    14L, 17L, 11L, 42L, 8L, 1L, 4L, 3L, 9L, 5L, 6L, 48L, 46L,
    10L, 50L, 49L, 47L, 2L, 45L, 43L, 44L), .Label = c("t  10 169 929",
    "t  10 187 641", "t  10 397 115", "t  10 460 818", "t  10 801 039",
    "t  11 019 940", "t  117 571 878", "t  11 804 006", "t  11 844 962",
    "t  12 969 186", "t  13 046 652", "t  13 219 945", "t  13 303 110",
    "t  13 843 411", "t  14 253 571", "t  14 720 891", "t  14 783 276",
    "t  14 963 434", "t  15 168 172", "t  15 286 066", "t  158 757 286",
    "t  18 672 981", "t  19 456 021", "t  20 700 680", "t  22 470 886",
    "t  23 117 059", "t  24 557 091", "t  25 281 114", "t  27 143 412",
    "t  28 769 259", "t  29 206 675", "t  29 303 152", "t  29 393 081",
    "t  29 981 271", "t  30 067 523", "t  31 936 895", "t  356 980 045",
    "t  35 844 547", "t  38 028 945", "t  42 255 583", "t  43 354 307",
    "t  6 568 760", "t  7 505 653", "t  8 267 153", "t  8 832 622",
    "t  8 858 669", "t  8 951 985", "t  9 125 210", "t  9 293 714",
    "t  9 311 666"), class = "factor"), tPIB.2009..R..1.000. =
structure(c(38L,
    21L, 9L, 41L, 40L, 39L, 37L, 35L, 32L, 36L, 34L, 33L, 31L,
    28L, 29L, 30L, 26L, 27L, 23L, 22L, 24L, 25L, 20L, 16L, 10L,
    17L, 19L, 15L, 14L, 13L, 18L, 12L, 42L, 8L, 3L, 6L, 4L, 11L,
    5L, 7L, 1L, 2L, 46L, 50L, 49L, 48L, 44L, 47L, 43L, 45L), .Label = c("t
10 257 022",
    "t  10 362 496", "t  10 889 035", "t  11 508 519", "t  11 520 289",
    "t  11 640 898", "t  11 969 256", "t  12 265 677", "t  131 487 268",
    "t  13 349 588", "t  13 615 507", "t  14 143 601", "t  14 686 950",
    "t  14 709 216", "t  15 323 512", "t  15 327 435", "t  16 092 093",
    "t  16 237 175", "t  16 568 144", "t  16 584 964", "t  170 517 226",
    "t  19 747 492", "t  20 157 567", "t  21 380 256", "t  22 015 096",
    "t  22 546 298", "t  24 473 664", "t  24 720 436", "t  24 974 495",
    "t  26 909 802", "t  28 935 628", "t  31 373 473", "t  31 617 716",
    "t  31 653 414", "t  32 475 487", "t  33 131 342", "t  36 873 055",
    "t  389 284 929", "t  40 482 809", "t  44 729 413", "t  45 741 463",
    "t  5 634 291", "t  8 688 475", "t  8 918 069", "t  9 034 995",
    "t  9 442 184", "t  9 599 600", "t  9 819 382", "t  9 904 464",
    "t  9 969 627"), class = "factor"), tPIB.2010..R..1.000. =
structure(c(47L,
    29L, 16L, 50L, 49L, 48L, 46L, 45L, 44L, 43L, 42L, 41L, 40L,
    39L, 38L, 37L, 36L, 35L, 34L, 33L, 32L, 31L, 30L, 28L, 27L,
    26L, 25L, 24L, 23L, 22L, 21L, 20L, 19L, 18L, 17L, 15L, 14L,
    13L, 12L, 11L, 10L, 9L, 8L, 7L, 6L, 5L, 4L, 3L, 2L, 1L), .Label = c("t
10 340 756",
    "t  10 539 378", "t  10 931 268", "t  11 009 306", "t  11 051 628",
    "t  11 214 103", "t  11 254 523", "t  11 267 976", "t  11 997 401",
    "t  12 114 090", "t  12 371 028", "t  12 703 017", "t  13 379 554",
    "t  13 690 888", "t  13 875 046", "t  149 906 319", "t  15 235 108",
    "t  15 692 359", "t  15 918 216", "t  16 127 236", "t  16 547 966",
    "t  17 004 019", "t  17 258 468", "t  17 915 048", "t  17 987 323",
    "t  18 286 904", "t  18 473 990", "t  18 539 693", "t  190 249 043",
    "t  20 124 600", "t  24 117 145", "t  24 445 744", "t  24 969 295",
    "t  25 313 179", "t  26 496 845", "t  27 616 035", "t  27 752 428",
    "t  28 297 360", "t  30 032 003", "t  35 578 586", "t  36 389 080",
    "t  36 688 629", "t  36 744 670", "t  37 106 309", "t  37 139 404",
    "t  43 038 100", "t  443 600 102", "t  48 598 153", "t  51 661 760",
    "t  53 106 497"), class = "factor"), tRanking.PIB = structure(c(11L,
    22L, 33L, 44L, 46L, 47L, 48L, 49L, 50L, 1L, 2L, 3L, 4L, 5L,
    6L, 7L, 8L, 9L, 10L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L,
    20L, 21L, 23L, 24L, 25L, 26L, 27L, 28L, 29L, 30L, 31L, 32L,
    34L, 35L, 36L, 37L, 38L, 39L, 40L, 41L, 42L, 43L, 45L), .Label =
c("t10º",
    "t11º", "t12º", "t13º", "t14º", "t15º", "t16º", "t17º",
    "t18º", "t19º", "t1º", "t20º", "t21º", "t22º", "t23º",
    "t24º", "t25º", "t26º", "t27º", "t28º", "t29º", "t2º",
    "t30º", "t31º", "t32º", "t33º", "t34º", "t35º", "t36º",
    "t37º", "t38º", "t39º", "t3º", "t40º", "t41º", "t42º",
    "t43º", "t44º", "t45º", "t46º", "t47º", "t48º", "t49º",
    "t4º", "t50º", "t5º", "t6º", "t7º", "t8º", "t9º"), class = "factor"),
    tPIB.per.capita..R.. = structure(c(36L, 24L, 45L, 26L, 16L,
    19L, 28L, 25L, 10L, 8L, 32L, 42L, 37L, 14L, 48L, 4L, 46L,
    30L, 43L, 49L, 13L, 35L, 40L, 29L, 33L, 27L, 5L, 12L, 18L,
    21L, 38L, 20L, 1L, 34L, 50L, 11L, 39L, 44L, 31L, 3L, 7L,
    9L, 41L, 22L, 17L, 15L, 47L, 23L, 6L, 2L), .Label = c("t   103 403,99",
    "t   10 341,78", "t   103 777,70", "t   115 319,91", "t   12 921,64",
    "t   12 940,66", "t   12 989,48", "t   13 728,08", "t   14 925,65",
    "t   15 161,47", "t   17 625,73", "t   17 703,61", "t   18 777,09",
    "t   19 540,20", "t   20 044,67", "t   21 748,25", "t   23 011,46",
    "t   25 609,30", "t   26 961,15", "t   27 506,28", "t   28 100,52",
    "t   29 153,85", "t   29 959,19", "t   30 088,24", "t   30 383,43",
    "t   30 400,49", "t   30 463,70", "t   30 524,80", "t   30 743,31",
    "t   30 988,80", "t   31 034,14", "t   33 939,56", "t   35 854,42",
    "t   36 034,46", "t   38 431,00", "t   39 450,87", "t   46 495,62",
    "t   51 070,03", "t   51 960,20", "t   54 353,94", "t   54 501,02",
    "t   54 599,81", "t   54 607,81", "t   55 063,52", "t   58 489,46",
    "t   65 790,53", "t   73 605,89", "t   74 950,56", "t   76 721,66",
    "t   83 075,82"), class = "factor"), tRanking.PIB.per.capita =
structure(c(4L,
    26L, 40L, 24L, 39L, 32L, 22L, 25L, 5L, 9L, 15L, 43L, 3L,
    47L, 35L, 7L, 38L, 19L, 42L, 34L, 49L, 8L, 46L, 21L, 11L,
    23L, 14L, 1L, 33L, 29L, 50L, 31L, 17L, 10L, 30L, 2L, 48L,
    41L, 18L, 16L, 12L, 6L, 45L, 28L, 37L, 44L, 36L, 27L, 13L,
    20L), .Label = c("t1.024º", "t1.039º", "t104º", "t141º",
    "t1.446º", "t1.488º", "t14º", "t153º", "t1.749º", "t174º",
    "t175º", "t1.946º", "t1.963º", "t1.969º", "t203º", "t21º",
    "t22º", "t260º", "t264º", "t2.662º", "t271º", "t277º",
    "t281º", "t282º", "t284º", "t288º", "t291º", "t309º",
    "t347º", "t34º", "t364º", "t386º", "t446º", "t45º",
    "t47º", "t49º", "t557º", "t59º", "t646º", "t69º", "t73º",
    "t74º", "t75º", "t766º", "t76º", "t77º", "t811º", "t87º",
    "t892º", "t93º"), class = "factor")), .Names = c("Municípios",
"tPopulação..2010.", "tRanking.populacional", "tPIB.2006..R..1.000.",
"tPIB.2007..R..1.000.", "tPIB.2008..R..1.000.", "tPIB.2009..R..1.000.",
"tPIB.2010..R..1.000.", "tRanking.PIB", "tPIB.per.capita..R..",
"tRanking.PIB.per.capita"), class = "data.frame", row.names = c("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", "35",
"36", "37", "38", "39", "40", "41", "42", "43", "44", "45", "46",
"47", "48", "49", "50"))
>

Em 25 de fevereiro de 2013 01:00, Manoel Nascimento <
manoelnascimento em gmail.com> escreveu:

>  Estou lendo os dados de um arquivo CSV com a função read.csv(). O R os
> lê normalmente. Como você diz que não consegue lê-los, procurei um meio de
> exportar dados, fiz um write.table() e deu o resultado em anexo, com as 50
> primeiras linhas. Será que com isto fica mais fácil tentar encontrar uma
> solução?
>
> []'s
> Manolo
>
>
Grato
Augusto C. A. Ribas

Site Pessoal: http://recologia.wordpress.com/<http://augustoribas.heliohost.org>
Lattes: http://lattes.cnpq.br/7355685961127056
-------------- Próxima Parte ----------
Um anexo em HTML foi limpo...
URL: <http://listas.inf.ufpr.br/pipermail/r-br/attachments/20130225/b170296f/attachment.html>


Mais detalhes sobre a lista de discussão R-br