R esta

download R esta

If you can't read please download the document

Transcript of R esta

1. R version 2.12.2 (2011-02-25)Copyright (C) 2011 The R Foundation for Statistical ComputingISBN 3-900051-07-0Platform: i386-pc-mingw32/i386 (32-bit)R es un software libre y viene sin GARANTIA ALGUNA.Usted puede redistribuirlo bajo ciertas circunstancias.Escriba 'license()' o 'licence()' para detalles de distribucion.R es un proyecto colaborativo con muchos contribuyentes.Escriba 'contributors()' para obtener ms informacin y'citation()' para saber cmo citar R o paquetes de R en publicaciones.Escriba 'demo()' para demostraciones, 'help()' para el sistema on-line de ayuda,o 'help.start()' para abrir el sistema de ayuda HTML con su navegador.Escriba 'q()' para salir de R.>datos=c(200,190,150,148,152,158,100,174,187,188,160,178,153,151,128,137,174,199,103,168,188,127,150,130,175)> datos[1] 200 190 150 148 152 158 100 174 187 188 160 178 153 151 128 137 174 199 103[20] 168 188 127 150 130 175> Rang= max(datos)-min(datos)> rangError: objeto 'rang' no encontrado> Rang[1] 100> m=round(1+3.3*log10(50))> m[1] 7> C=Rang/m> C[1] 14.28571> intervalos=cut(datos, breaks=c(100,115,130,145,160,175,190,205))> intervalos[1] (190,205] (175,190] (145,160] (145,160] (145,160] (145,160] (160,175] (175,190] (175,190] (145,160] (175,190][13] (145,160] (145,160] (115,130] (130,145] (160,175] (190,205] (100,115](160,175] (175,190] (115,130] (145,160] (115,130][25] (160,175]Levels: (100,115] (115,130] (130,145] (145,160] (160,175] (175,190] (190,205]> f=table(intervalos)> fintervalos(100,115] (115,130] (130,145] (145,160] (160,175] (175,190] (190,205]1 3 1 8 4 5 2> n=sum(f)> n[1] 24> h=f/n> hintervalos(100,115] (115,130] (130,145] (145,160] (160,175] (175,190] (190,205]0.04166667 0.12500000 0.04166667 0.33333333 0.16666667 0.20833333 0.08333333> F=cumsum(f)> F(100,115] (115,130] (130,145] (145,160] (160,175] (175,190] (190,205]1 4 5 13 17 22 24 2. > H=cumsum(h)> H(100,115] (115,130] (130,145] (145,160] (160,175] (175,190] (190,205]0.04166667 0.16666667 0.20833333 0.54166667 0.70833333 0.91666667 1.00000000> cbind(f,h,F,H)f h F H(100,115] 1 0.04166667 1 0.04166667(115,130] 3 0.12500000 4 0.16666667(130,145] 1 0.04166667 5 0.20833333(145,160] 8 0.33333333 13 0.54166667(160,175] 4 0.16666667 17 0.70833333(175,190] 5 0.20833333 22 0.91666667(190,205] 2 0.08333333 24 1.00000000> LimSup=c(115,130,145,160,175,190,205)> LimInf=c(100,115,130,145,160,175,190)> marca=Limsup+Liminf)/2Error: inesperado ')' en "marca=Limsup+Liminf)"> marca=(Limsup+Liminf)/2Error: objeto 'Limsup' no encontrado>> Marca= (LimSup+LimInf)/2>> Marca[1] 107.5 122.5 137.5 152.5 167.5 182.5 197.5> table=cbind(f,marca,h,F,H)Error en cbind(f, marca, h, F, H) : objeto 'marca' no encontrado> table=cbind(f,Marca,h,F,H)> tablef Marca h F H(100,115] 1 107.5 0.04166667 1 0.04166667(115,130] 3 122.5 0.12500000 4 0.16666667(130,145] 1 137.5 0.04166667 5 0.20833333(145,160] 8 152.5 0.33333333 13 0.54166667(160,175] 4 167.5 0.16666667 17 0.70833333(175,190] 5 182.5 0.20833333 22 0.91666667(190,205] 2 197.5 0.08333333 24 1.00000000