[R-es] pregunta
Eric
ericconchamunoz en gmail.com
Vie Mayo 8 21:07:15 CEST 2015
Hola Jose, mirando el archivo que adjuntas veo que el separador de
columnas es ";" (punto y coma) y el separador decimal es "," (coma).
Probe el siguiente codigo y funciona bien:
pba <- read.table("tYA1.csv", sep=";", dec=",", header=TRUE)
head(pba)
Edad Talla Peso.Total Cintura indCintCad Cadera A..Fisica Grasa.. Grasa.Kg
1 40 161 60.4 83.0 10.3750 108.0 0 36.1 24.8
2 25 172 89.0 90.0 11.2500 118.0 1 38.3 34.1
3 25 172 89.0 90.0 11.2500 118.0 1 38.3 34.1
4 26 157 58.0 73.5 9.1875 104.0 0 27.9 16.2
5 37 166 66.0 81.5 10.1875 106.0 0 33.2 21.9
6 24 155 42.0 53.0 6.6250 83.5 0 25.7 11.3
Magro.. Magro.Kg Peso.Total.1 ACT.. H2O..L. X..H2O.Extrac H2O.EXT.L.
1 63.9 38.6 60.4 46.7 28.2 22.1 13.4
2 61.7 54.9 89.0 41.3 36.8 19.7 17.5
3 61.7 54.9 89.0 41.3 36.8 19.7 17.5
4 72.1 41.8 58.0 52.1 30.2 24.4 14.1
5 66.8 44.1 66.0 47.3 31.2 22.5 14.8
6 74.3 32.7 44.0 57.3 25.2 27.0 11.9
X..H2O.Intra H2O.Int..L. Masa.Cel.Corp H2O.3er.Espac TMBtasa.metabolica.basal
1 25.3 15.3 21.8 -0.4 1362
2 24.0 21.4 30.5 -2.1 1754
3 24.0 21.4 30.5 -2.1 1754
4 27.2 15.8 22.5 0.3 1439
5 25.3 16.7 23.9 -0.3 1494
6 28.0 12.3 17.6 1.0 1220
IMC IMG.masa.grasa IMLibre.grasa Ind.Cint.Cade Z50impedancia R50 Xc
1 23.3 8.4 14.9 0.76 733 730 73.7
2 30.1 11.5 18.6 0.76 592 589 60.3
3 30.1 11.5 18.6 0.76 592 589 60.3
4 23.6 6.6 17.0 0.70 597 594 59.5
5 23.9 7.9 16.0 0.76 662 659 58.7
6 18.3 4.7 13.6 0.63 751 748 64.8
Angulo.Fase.pqeno.grave Z.talla R.talla X.talla
1 5.8 0.4577640 12.086093 0.8879518
2 5.8 0.3505814 6.617978 0.6700000
3 5.8 0.3505814 6.617978 0.6700000
4 5.7 0.3789809 10.241379 0.8095238
5 5.1 0.3536145 9.984848 0.7202454
6 5.0 0.4180645 17.809524 1.2226415
summary(pba)
Edad Talla Peso.Total Cintura
Min. :18.00 Min. :146.0 Min. :40.00 Min. : 53.00
1st Qu.:18.00 1st Qu.:160.0 1st Qu.:54.30 1st Qu.: 68.00
Median :20.00 Median :164.0 Median :60.40 Median : 74.50
Mean :22.86 Mean :163.8 Mean :61.77 Mean : 74.16
3rd Qu.:25.00 3rd Qu.:168.0 3rd Qu.:67.50 3rd Qu.: 80.00
Max. :40.00 Max. :178.0 Max. :93.00 Max. :102.00
indCintCad Cadera A..Fisica Grasa..
Min. : 6.625 Min. : 56.0 Min. :0.00000 Min. :11.70
1st Qu.: 8.500 1st Qu.: 87.0 1st Qu.:0.00000 1st Qu.:19.20
Median : 9.312 Median : 96.0 Median :0.00000 Median :23.70
Mean : 9.270 Mean : 108.2 Mean :0.09589 Mean :24.72
3rd Qu.:10.000 3rd Qu.: 102.0 3rd Qu.:0.00000 3rd Qu.:29.80
Max. :12.750 Max. :1069.0 Max. :1.00000 Max. :42.00
Grasa.Kg Magro.. Magro.Kg Peso.Total.1
Min. : 5.80 Min. :58.00 Min. :32.70 Min. :40.00
1st Qu.:10.50 1st Qu.:70.20 1st Qu.:42.30 1st Qu.:54.30
Median :14.20 Median :76.30 Median :46.10 Median :60.40
Mean :15.97 Mean :75.28 Mean :45.93 Mean :61.79
3rd Qu.:20.80 3rd Qu.:80.80 3rd Qu.:49.50 3rd Qu.:67.70
Max. :39.10 Max. :88.30 Max. :61.10 Max. :93.00
ACT.. H2O..L. X..H2O.Extrac H2O.EXT.L. X..H2O.Intra
Min. :41.30 Min. :25.20 Min. :19.70 Min. :11.90 Min. :23.8
1st Qu.:49.70 1st Qu.:30.30 1st Qu.:23.30 1st Qu.:14.10 1st Qu.:26.7
Median :52.90 Median :32.60 Median :24.90 Median :15.20 Median :28.0
Mean :53.34 Mean :32.37 Mean :24.95 Mean :15.14 Mean :27.8
3rd Qu.:57.80 3rd Qu.:34.10 3rd Qu.:27.00 3rd Qu.:16.00 3rd Qu.:29.0
Max. :67.80 Max. :41.00 Max. :31.10 Max. :19.20 Max. :32.3
H2O.Int..L. Masa.Cel.Corp H2O.3er.Espac TMBtasa.metabolica.basal
Min. :12.30 Min. :17.60 Min. :-2.4000 Min. : 168.2
1st Qu.:15.40 1st Qu.:22.10 1st Qu.:-0.1000 1st Qu.:1439.0
Median :16.70 Median :23.90 Median : 0.4000 Median :1543.0
Mean :17.02 Mean :24.31 Mean : 0.2401 Mean :1516.9
3rd Qu.:18.40 3rd Qu.:26.30 3rd Qu.: 0.9000 3rd Qu.:1622.0
Max. :23.30 Max. :33.20 Max. : 1.7000 Max. :1903.0
IMC IMG.masa.grasa IMLibre.grasa Ind.Cint.Cade
Min. :15.80 Min. : 1.900 Min. :13.5 Min. :0.6300
1st Qu.:20.20 1st Qu.: 4.000 1st Qu.:16.0 1st Qu.:0.7300
Median :22.50 Median : 5.400 Median :17.2 Median :0.7600
Mean :23.05 Mean : 5.966 Mean :17.1 Mean :0.7655
3rd Qu.:25.60 3rd Qu.: 7.700 3rd Qu.:18.3 3rd Qu.:0.8000
Max. :36.80 Max. :15.500 Max. :21.3 Max. :0.9100
Z50impedancia R50 Xc Angulo.Fase.pqeno.grave
Min. : 5.4 Min. :453 Min. : 6.40 Min. :4.400
1st Qu.:546.0 1st Qu.:540 1st Qu.:54.40 1st Qu.:5.300
Median :589.0 Median :587 Median :59.40 Median :5.800
Mean :576.6 Mean :587 Mean :58.29 Mean :5.763
3rd Qu.:626.0 3rd Qu.:622 3rd Qu.:63.40 3rd Qu.:6.200
Max. :751.0 Max. :748 Max. :77.50 Max. :7.100
Z.talla R.talla X.talla
Min. :0.0381 Min. : 5.043 Min. :0.09552
1st Qu.:0.3304 1st Qu.: 7.845 1st Qu.:0.69799
Median :0.3575 Median : 9.719 Median :0.79389
Mean :0.3568 Mean : 9.980 Mean :0.80095
3rd Qu.:0.3968 3rd Qu.:11.550 3rd Qu.:0.87733
Max. :0.4859 Max. :17.810 Max. :1.34211
Saludos, eric.
On 5/8/15, jbetancourt <jbetancourt en iscmc.cmw.sld.cu> wrote:
>
> Estimados
> Al dirigir la lectura de un folder tYA1.csv me da este error y no me
> percato del motivo, adjunto archivo. Espero su ayuda
> Saludos
> José
>
>
>
>> setwd("D:/Public/Documents/R/bioimpedancia")
>> a<-read.csv("tYA1.csv",header=TRUE, sep=",", dec=".")
>
>
> Error in read.table(file = file, header = header, sep = sep, quote = quote,
> :
> more columns than column names
>
>
--
Nota: las tildes se han omitido para evitar conflictos con algunos lectores
de correo.
Frases notables:
* SATYÂT NÂSTI PARO DHARMAH (No hay religion mas elevada que la verdad)
* La oscuridad no se combate, se ilumina ...
* Un economista es un experto que sabrá mañana por qué las cosas que predijo
ayer no han sucedido hoy (Laurence Peter).
Más información sobre la lista de distribución R-help-es