Professional Documents
Culture Documents
TAREA 1A
Coefficients:
Estimate Std. Error
(Intercept) -0.76638 0.92127
x 1.00670 0.07691
t value Pr(>|t|)
(Intercept) -0.832 0.416
x 13.090 1.23e-10 ***
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05
‘.’ 0.1 ‘ ’ 1
Coefficients:
Estimate Std. Error
(Intercept) -0.25977 0.72069
x 0.96055 0.07349
t value Pr(>|t|)
(Intercept) -0.36 0.723
x 13.07 1.26e-10 ***
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05
‘.’ 0.1 ‘ ’ 1
>attach(dummy) Hace que las columnas en el The following object is masked _by_ .GlobalEnv:
“data frame” (marco de datos)
sean visibles como variables. x
x, y
>lrf<-lowess(x,y) Permite hacer una función de
>lrf regresión local no paramétrica, $x
separando valores de “x” y “y”. [1] 1 2 3 4 5 6 7 8 9 10 11
[12] 12 13 14 15 16 17 18 19 20
$y
[1] 1.155135 1.975490 2.787105
[4] 3.579131 4.350003 5.123139
[7] 5.978740 6.792263 7.521044
[10] 8.280451 9.247565 10.455603
[13] 11.788502 13.079338 14.302887
[16] 15.546021 16.792003 18.020414
[19] 19.225475 20.411670
>plot(x, y) Permite visualizar un grafico de
puntos estandar, utilizando las
variables “x” y “y”.
>filepath
>file.show(filepath Permite visualizar el archivo de Expt Run Speed
) datos. 001 1 1 850
002 1 2 740
003 1 3 900
004 1 4 1070
005 1 5 930
006 1 6 850
007 1 7 950
008 1 8 980
009 1 9 980
010 1 10 880
011 1 11 1000
012 1 12 980
013 1 13 930
014 1 14 650
015 1 15 760
016 1 16 810
017 1 17 1000
018 1 18 1000
019 1 19 960
020 1 20 960
021 2 1 960
022 2 2 940
023 2 3 960
024 2 4 940
025 2 5 880
026 2 6 800
027 2 7 850
028 2 8 880
029 2 9 900
030 2 10 840
031 2 11 830
032 2 12 790
033 2 13 810
034 2 14 880
035 2 15 880
036 2 16 830
037 2 17 800
038 2 18 790
039 2 19 760
040 2 20 800
041 3 1 880
042 3 2 880
043 3 3 880
044 3 4 860
045 3 5 720
046 3 6 720
047 3 7 620
048 3 8 860
049 3 9 970
050 3 10 950
051 3 11 880
052 3 12 910
053 3 13 850
054 3 14 870
055 3 15 840
056 3 16 840
057 3 17 850
058 3 18 840
059 3 19 840
060 3 20 840
061 4 1 890
062 4 2 810
063 4 3 810
064 4 4 820
065 4 5 800
066 4 6 770
067 4 7 760
068 4 8 740
069 4 9 750
070 4 10 760
071 4 11 910
072 4 12 920
073 4 13 890
074 4 14 860
075 4 15 880
076 4 16 720
077 4 17 840
078 4 18 850
079 4 19 850
080 4 20 780
081 5 1 890
082 5 2 840
083 5 3 780
084 5 4 810
085 5 5 760
086 5 6 810
087 5 7 790
088 5 8 810
089 5 9 820
090 5 10 850
091 5 11 870
092 5 12 870
093 5 13 810
094 5 14 740
095 5 15 810
096 5 16 940
097 5 17 950
098 5 18 800
099 5 19 810
100 5 20 870
>mm$Run<- [1] 1 2 3 4 5 6 7 8 9 10 11
factor(mm$Run) [12] 12 13 14 15 16 17 18 19 20 1 2
[23] 3 4 5 6 7 8 9 10 11 12 13
>mm$Run [34] 14 15 16 17 18 19 20 1 2 3 4
[45] 5 6 7 8 9 10 11 12 13 14 15
[56] 16 17 18 19 20 1 2 3 4 5 6
[67] 7 8 9 10 11 12 13 14 15 16 17
[78] 18 19 20 1 2 3 4 5 6 7 8
[89] 9 10 11 12 13 14 15 16 17 18 19
[100] 20
20 Levels: 1 2 3 4 5 6 7 8 9 10 ... 20
>attach(mm) Hace visible el marco de datos en
la posición 3 ( el valor por
defecto)
>plot(Expt, Speed, Se comparan los cinco elementos
main=”Speed of con simples diagramas de caja.
Light Data”,
xlab=”Experiment
No.”)
>oldpar $adj
[1] 0.5
$ann
[1] TRUE
$ask
[1] FALSE
$bg
[1] "white"
$bty
[1] "o"
$cex
[1] 1
$cex.axis
[1] 1
$cex.lab
[1] 1
$cex.main
[1] 1.2
$cex.sub
[1] 1
$col
[1] "black"
$col.axis
[1] "black"
$col.lab
[1] "black"
$col.main
[1] "black"
$col.sub
[1] "black"
$crt
[1] 0
$err
[1] 0
$family
[1] ""
$fg
[1] "black"
$fig
[1] 0 1 0 1
$fin
[1] 4.125000 2.208333
$font
[1] 1
$font.axis
[1] 1
$font.lab
[1] 1
$font.main
[1] 2
$font.sub
[1] 1
$lab
[1] 5 5 7
$las
[1] 0
$lend
[1] "round"
$lheight
[1] 1
$ljoin
[1] "round"
$lmitre
[1] 10
$lty
[1] "solid"
$lwd
[1] 1
$mai
[1] 1.02 0.82 0.82 0.42
$mar
[1] 5.1 4.1 4.1 2.1
$mex
[1] 1
$mfcol
[1] 1 1
$mfg
[1] 1 1 1 1
$mfrow
[1] 1 1
$mgp
[1] 3 1 0
$mkh
[1] 0.001
$new
[1] FALSE
$oma
[1] 0 0 0 0
$omd
[1] 0 1 0 1
$omi
[1] 0 0 0 0
$pch
[1] 1
$pin
[1] 2.8850000 0.3683333
$plt
[1] 0.1987879 0.8981818 0.4618868
[4] 0.6286792
$ps
[1] 12
$pty
[1] "m"
$smo
[1] 1
$srt
[1] 0
$tck
[1] NA
$tcl
[1] -0.5
$usr
[1] 0.3 5.7 602.0 1088.0
$xaxp
[1] 1 5 4
$xaxs
[1] "r"
$xaxt
[1] "s"
$xpd
[1] FALSE
$yaxp
[1] 700 1000 3
$yaxs
[1] "r"
$yaxt
[1] "s"
$ylbias
[1] 0.2
>contour(x, y, f) Se crean mapas de contorno de
“f”’; el segundo mapa presentado
>contour(x,y,f, tiene mas “nlevels” y posee una
nlevels=15, tonalidad negra mas marcada.
add=TRUE)
>par(pty=”s”)
>plot(z,type=”1”)
>lines(z)
PARTE 1B
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/colorspace_1.4-0.tgz'
Content type 'application/x-gzip' length
2340274 bytes (2.2 MB)
================================
==================
downloaded 2.2 MB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/assertthat_0.2.0.tgz'
Content type 'application/x-gzip' length
42504 bytes (41 KB)
================================
==================
downloaded 41 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/utf8_1.1.4.tgz'
Content type 'application/x-gzip' length
172781 bytes (168 KB)
================================
==================
downloaded 168 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/mime_0.6.tgz'
Content type 'application/x-gzip' length
26324 bytes (25 KB)
================================
==================
downloaded 25 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/labeling_0.3.tgz'
Content type 'application/x-gzip' length
39467 bytes (38 KB)
================================
==================
downloaded 38 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/munsell_0.5.0.tgz'
Content type 'application/x-gzip' length
217317 bytes (212 KB)
================================
==================
downloaded 212 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/R6_2.3.0.tgz'
Content type 'application/x-gzip' length
34492 bytes (33 KB)
================================
==================
downloaded 33 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/cli_1.0.1.tgz'
Content type 'application/x-gzip' length
544664 bytes (531 KB)
================================
==================
downloaded 531 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/crayon_1.3.4.tgz'
Content type 'application/x-gzip' length
709728 bytes (693 KB)
================================
==================
downloaded 693 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/fansi_0.4.0.tgz'
Content type 'application/x-gzip' length
172972 bytes (168 KB)
================================
==================
downloaded 168 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/pillar_1.3.1.tgz'
Content type 'application/x-gzip' length
86893 bytes (84 KB)
================================
==================
downloaded 84 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/pkgconfig_2.0.2.tgz'
Content type 'application/x-gzip' length
15456 bytes (15 KB)
================================
==================
downloaded 15 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/glue_1.3.0.tgz'
Content type 'application/x-gzip' length
93367 bytes (91 KB)
================================
==================
downloaded 91 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/stringi_1.2.4.tgz'
Content type 'application/x-gzip' length
13513176 bytes (12.9 MB)
================================
==================
downloaded 12.9 MB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/evaluate_0.12.tgz'
Content type 'application/x-gzip' length
46403 bytes (45 KB)
================================
==================
downloaded 45 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/highr_0.7.tgz'
Content type 'application/x-gzip' length
29388 bytes (28 KB)
================================
==================
downloaded 28 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/markdown_0.9.tgz'
Content type 'application/x-gzip' length
175235 bytes (171 KB)
================================
==================
downloaded 171 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/yaml_2.2.0.tgz'
Content type 'application/x-gzip' length
191863 bytes (187 KB)
================================
==================
downloaded 187 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/xfun_0.4.tgz'
Content type 'application/x-gzip' length
108251 bytes (105 KB)
================================
==================
downloaded 105 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/backports_1.1.3.tgz'
Content type 'application/x-gzip' length
53800 bytes (52 KB)
================================
==================
downloaded 52 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/jsonlite_1.6.tgz'
Content type 'application/x-gzip' length
1070380 bytes (1.0 MB)
================================
==================
downloaded 1.0 MB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/digest_0.6.18.tgz'
Content type 'application/x-gzip' length
166752 bytes (162 KB)
================================
==================
downloaded 162 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/lazyeval_0.2.1.tgz'
Content type 'application/x-gzip' length
123472 bytes (120 KB)
================================
==================
downloaded 120 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/plyr_1.8.4.tgz'
Content type 'application/x-gzip' length
818975 bytes (799 KB)
================================
==================
downloaded 799 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/reshape2_1.4.3.tgz'
Content type 'application/x-gzip' length
259673 bytes (253 KB)
================================
==================
downloaded 253 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/rlang_0.3.1.tgz'
Content type 'application/x-gzip' length
1135713 bytes (1.1 MB)
================================
==================
downloaded 1.1 MB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/scales_1.0.0.tgz'
Content type 'application/x-gzip' length
590050 bytes (576 KB)
================================
==================
downloaded 576 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/tibble_2.0.1.tgz'
Content type 'application/x-gzip' length
640837 bytes (625 KB)
================================
==================
downloaded 625 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/viridisLite_0.3.0.tgz'
Content type 'application/x-gzip' length
53512 bytes (52 KB)
================================
==================
downloaded 52 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/withr_2.1.2.tgz'
Content type 'application/x-gzip' length
122230 bytes (119 KB)
================================
==================
downloaded 119 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/RColorBrewer_1.1-2.tgz'
Content type 'application/x-gzip' length
24322 bytes (23 KB)
================================
==================
downloaded 23 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/stringr_1.3.1.tgz'
Content type 'application/x-gzip' length
167212 bytes (163 KB)
================================
==================
downloaded 163 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/magrittr_1.5.tgz'
Content type 'application/x-gzip' length
152460 bytes (148 KB)
================================
==================
downloaded 148 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/checkmate_1.9.1.tgz'
Content type 'application/x-gzip' length
715325 bytes (698 KB)
================================
==================
downloaded 698 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/htmlwidgets_1.3.tgz'
Content type 'application/x-gzip' length
762468 bytes (744 KB)
================================
==================
downloaded 744 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/rstudioapi_0.9.0.tgz'
Content type 'application/x-gzip' length
154521 bytes (150 KB)
================================
==================
downloaded 150 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/Rcpp_1.0.0.tgz'
Content type 'application/x-gzip' length
4343466 bytes (4.1 MB)
================================
==================
downloaded 4.1 MB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/Formula_1.2-3.tgz'
Content type 'application/x-gzip' length
161847 bytes (158 KB)
================================
==================
downloaded 158 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/ggplot2_3.1.0.tgz'
Content type 'application/x-gzip' length
3179264 bytes (3.0 MB)
================================
==================
downloaded 3.0 MB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/latticeExtra_0.6-28.tgz'
Content type 'application/x-gzip' length
2072202 bytes (2.0 MB)
================================
==================
downloaded 2.0 MB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/acepack_1.4.1.tgz'
Content type 'application/x-gzip' length
74840 bytes (73 KB)
================================
==================
downloaded 73 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/gtable_0.2.0.tgz'
Content type 'application/x-gzip' length
57162 bytes (55 KB)
================================
==================
downloaded 55 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/gridExtra_2.3.tgz'
Content type 'application/x-gzip' length
1077959 bytes (1.0 MB)
================================
==================
downloaded 1.0 MB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/data.table_1.12.0.tgz'
Content type 'application/x-gzip' length
1756887 bytes (1.7 MB)
================================
==================
downloaded 1.7 MB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/htmlTable_1.13.1.tgz'
Content type 'application/x-gzip' length
251166 bytes (245 KB)
================================
==================
downloaded 245 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/viridis_0.5.1.tgz'
Content type 'application/x-gzip' length
1864608 bytes (1.8 MB)
================================
==================
downloaded 1.8 MB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/htmltools_0.3.6.tgz'
Content type 'application/x-gzip' length
205363 bytes (200 KB)
================================
==================
downloaded 200 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/base64enc_0.1-3.tgz'
Content type 'application/x-gzip' length
27274 bytes (26 KB)
================================
==================
downloaded 26 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/HistData_0.8-4.tgz'
Content type 'application/x-gzip' length
356598 bytes (348 KB)
================================
==================
downloaded 348 KB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/Hmisc_4.1-1.tgz'
Content type 'application/x-gzip' length
1798684 bytes (1.7 MB)
================================
==================
downloaded 1.7 MB
trying URL
'https://cran.rstudio.com/bin/macosx/el-
capitan/contrib/3.4/UsingR_2.0-6.tgz'
Content type 'application/x-gzip' length
2031881 bytes (1.9 MB)
================================
==================
downloaded 1.9 MB
trying URL
'https://cran.rstudio.com/src/contrib/knitr_1.2
1.tar.gz'
Content type 'application/x-gzip' length
699667 bytes (683 KB)
================================
==================
downloaded 683 KB
format.pval, units
Attaching package: ‘UsingR’
cancer
Warning messages:
1: package ‘UsingR’ was built under R
version 3.4.4
2: package ‘HistData’ was built under R
version 3.4.4
3: package ‘Formula’ was built under R
version 3.4.4
4: package ‘ggplot2’ was built under R
version 3.4.4
TAREA 1B
>((1+2)/(3+4))^2 [1]
0.1836735
[1] 1 1 1 2 2
2333
[1] 1 1 1 2 2
3
[1] 1 2 3 4 5
4321
[1] 1964
1965 1966
1967 1968
[6] 1969
1970 1971
1972 1973
[11] 1974
1975 1976
1977 1978
[16] 1979
1980 1981
1982 1983
[21] 1984
1985 1986
1987 1988
[26] 1989
1990 1991
1992 1993
[31] 1994
1995 1996
1997 1998
[36] 1999
2000 2001
2002 2003
[1] 0 25
50 75 100
[6] 125
150 175
200 225
[11] 250
275 300
325 350
[16] 375
400 425
450 475
[21] 500
525 550
575 600
[26] 625
650 675
700 725
[31] 750
775 800
825 850
[36] 875
900 925
950 975
[41] 1000
[1] 0.5
> dvd1<-c(79,161,133,99,143,249,302) Se almacenan los meses [1] 79 161
> dvd1 del año dentro del vector 133 99
> dvd2<-c(74,127,210,249,368) “dvd”, al inicio los que 143 249
> dvd2 tienen 31 dias y después 302
>mean(dvd1) los de 30.
>mean(dvd2) Se obtiene el valor [1] 74 127
promedio de los vectores 210 249
“mean(dvd1)” y 368
“mean(dvd2)”.
[1]
166.5714
[1] 205.6
> bill<-c(46,33,39,37,46,30,48,32,49,35,30,48) Se insertan las facturas [1] 46 33
> bill mensuales del teléfono en 39 37 46
el vector “bill”. La función 30 48 32
“sum(bill)” permite 49
> sum(bill) encontrar el valor total [10] 35 30
gastado durante el año. 48
> min(bill) Con “min(bill)” y con
“max(bill)” conocemos el [1] 473
> max(bill) menor y mayor valor,
respectivamente. [1] 30
> sum(bill>40) “sum(bill>40)/length(bill)
” nos dice cuantos valores [1] 49
> sum(bill>40)/length(bill) son mayores a 40 y
sum(bill>40)/length(bill) [1] 5
indica el porcentaje de
facturas que exceden 40. [1]
0.4166667
[1]
0.5614035
>x=c(1,3,5,7,9) Tras definir las variables “x” y [1] 2 4 6 8 10
>y=c(2,3,5,7,11,13) “y”, se ejecutan las siguientes
operaciones: [1] 4 6 10 14 22 26
> x+1
> y*2 Suma y multiplicación que [1] 5
> length(x) involucran las variables.
Length() permite conocer [1] 6
> length(y) cuantos elementos posee el
conjunto. [1] 3 6 10 14 20 14
> x+y Warning message:
NA significa que no esta In x + y : longer object
definido un valor indicador. length is not a multiple
> sum(x>5) of shorter object length
> sum(x[x>5])
> sum(x>5|x<3) [1] 2
[1] 16
[1] 3
[1] 5
[1] 2 3 7 11 13
[1] 2 5 11 NA NA
[1] 7 11 13
>y[3]
>y[-3]
>y[x]
> y[y>=7]
> "ABCDE"=="ABCDE" Los datos contenidos entre comillas son [1] TRUE
comparados entre si utilizando el signo “=” [1] TRUE
> "ABCDE"<"ABCDEF" para comprobar si es una igualdad o no; si [1] FALSE
> "ABCDE"<"abcde" efectivamente lo es, el resultado será [1] FALSE
> "ZZZZZ"<"aaaaa" “TRUE” sino arrojara “FALSE” [1] TRUE
> "11"<"8"
[1] 304
[1] 25
[1] 143
[1] 2 3 5 7
11 13 17 19
[1] 4 5 7 9
13 15 19 21
[1] 3 5
7 11 13
[6] 17 19
23 29 31
[11] 37 41
43 47 53
[16] 59 61
67 71 73
[21] 79 83
89 97 101
[26] 103
107 109 113
127
[31] 131
137 139 149
151
[36] 157
163 167 173
179
[41] 181
191 193 197
199
[46] 211
223 227 229
233
[51] 239
241 251 257
263
[56] 269
271 277 281
283
[61] 293
307 311 313
317
[66] 331
337 347 349
353
[71] 359
367 373 379
383
[76] 389
397 401 409
419
[81] 421
431 433 439
443
[86] 449
457 461 463
467
[91] 479
487 491 499
503
[96] 509
521 523 541
547
[101] 557
563 569 571
577
[106] 587
593 599 601
607
[111] 613
617 619 631
641
[116] 643
647 653 659
661
[121] 673
677 683 691
701
[126] 709
719 727 733
739
[131] 743
751 757 761
769
[136] 773
787 797 809
811
[141] 821
823 827 829
839
[146] 853
857 859 863
877
[151] 881
883 887 907
911
[156] 919
929 937 941
947
[161] 953
967 971 977
983
[166] 991
997 1009
1013 1019
[171] 1021
1031 1033
1039 1049
[176] 1051
1061 1063
1069 1087
[181] 1091
1093 1097
1103 1109
[186] 1117
1123 1129
1151 1153
[191] 1163
1171 1181
1187 1193
[196] 1201
1213 1217
1223 1229
[201] 1231
1237 1249
1259 1277
[206] 1279
1283 1289
1291 1297
[211] 1301
1303 1307
1319 1321
[216] 1327
1361 1367
1373 1381
[221] 1399
1409 1423
1427 1429
[226] 1433
1439 1447
1451 1453
[231] 1459
1471 1481
1483 1487
[236] 1489
1493 1499
1511 1523
[241] 1531
1543 1549
1553 1559
[246] 1567
1571 1579
1583 1597
[251] 1601
1607 1609
1613 1619
[256] 1621
1627 1637
1657 1663
[261] 1667
1669 1693
1697 1699
[266] 1709
1721 1723
1733 1741
[271] 1747
1753 1759
1777 1783
[276] 1787
1789 1801
1811 1823
[281] 1831
1847 1861
1867 1871
[286] 1873
1877 1879
1889 1901
[291] 1907
1913 1931
1933 1949
[296] 1951
1973 1979
1987 1993
[301] 1997
1999 2003
[1] -304
[1] 1 2 2
4 2 4 2 4 6
[10] 2 6 4
2 4 6 6 2 6
[19] 4 2 6
4 6 8 4 2 4
[28] 2 4 14
4 6 2 10 2
6
[37] 6 4 6
6 2 10 2 4
2
[46] 12 12 4
2 4 6 2 10
6
[55] 6 6 2
6 4 2 10 14
4
[64] 2 4 14
6 10 2 4 6
8
[73] 6 6 4
6 8 4 8 10
2
[82] 10 2 6
4 6 8 4 2 4
[91] 12 8 4
8 4 6 12 2
18
[100] 6 10 6
6 2 6 10 6
6
[109] 2 6 6
4 2 12 10 2
4
[118] 6 6 2
12 4 6 8 10
8
[127] 10 8 6
6 4 8 6 4 8
[136] 4 14
10 12 2 10 2
4 2
[145] 10 14
4 2 4 14 4
2 4
[154] 20 4 8
10 8 4 6 6
14
[163] 4 6 6
8 6 12 4 6
2
[172] 10 2 6
10 2 10 2 6
18
[181] 4 2 4
6 6 8 6 6
22
[190] 2 10 8
10 6 6 8 12
4
[199] 6 6 2
6 12 10 18 2
4
[208] 6 2 6
4 2 4 12 2
6
[217] 34 6 6
8 18 10 14 4
2
[226] 4 6 8
4 2 6 12 10
2
[235] 4 2 4
6 12 12 8 12
6
[244] 4 6 8
4 8 4 14 4
6
[253] 2 4 6
2 6 10 20 6
4
[262] 2 24 4
2 10 12 2 10
8
[271] 6 6 6
18 6 4 2 12
10
[280] 12 8
16 14 6 4 2
4 2
[289] 10 12
6 6 18 2 16
2 22
[298] 6 8 6
4 2 4
[1] 61
>treering “Treering” contiene anchos de anillos Time Series:
de arboles en unidades sin Start = -6000
>length(treering) dimensiones. End = 1979
>min(treering) Con “length(treering)” obtenemos el Frequency =
numero total de observaciones. 1
>max(treering) Con “min(treering)” obtenemos el [1] 1.345
numero de observación mas bajo. 1.077 1.545
>sum(treering>1.5) Con “max(treering)” obtenemos el 1.319
numero de observación mas alto. [5] 1.413
Con “sum(treering>1.5)” conocemos 1.069 0.489
cuantas observaciones son mayores a 1.171
1.5. [9] 0.887
0.493 0.346
0.846
[13] 0.837
0.079 0.829
0.919
[17] 0.776
0.081 0.876
0.254
[21] 1.092
0.659 0.900
0.732
[25] 0.703
0.690 0.581
0.834
[29] 0.838
0.600 0.611
0.704
[33] 0.517
0.525 1.086
0.849
[37] 0.183
0.823 0.433
0.849
[41] 1.021
0.813 0.675
0.479
[45] 0.824
0.473 1.010
1.297
[49] 0.917
0.457 0.866
1.121
[53] 1.301
1.017 0.676
0.816
[57] 1.365
0.759 0.791
1.016
[61] 0.959
0.966 1.355
0.966
[65] 0.771
0.561 1.712
1.514
[69] 0.677
0.613 1.265
0.342
[73] 0.918
1.346 0.786
0.557
[77] 1.444
1.516 1.329
1.071
[81] 1.105
1.211 1.491
1.105
[85] 1.285
1.202 1.587
0.663
[89] 1.139
1.073 0.659
0.821
[93] 1.080
1.149 0.863
0.889
[97] 1.175
0.938 1.007
1.180
[101] 1.230
1.249 1.435
0.418
[105] 0.590
0.576 1.001
0.138
[109] 1.356
0.914 0.637
1.170
[113] 0.841
0.880 0.894
0.889
[117] 0.482
0.170 1.148
0.905
[121] 0.642
0.717 0.107
0.686
[125] 0.254
0.961 0.789
1.121
[129] 1.362
1.047 1.082
0.239
[133] 0.621
0.471 0.744
0.450
[137] 1.167
1.130 1.039
0.329
[141] 1.351
1.150 0.998
1.052
[145] 1.283
1.245 1.395
1.223
[149] 0.593
1.325 0.741
1.533
[153] 1.480
1.311 0.970
0.924
[157] 1.219
1.337 0.671
1.195
[161] 0.999
1.299 1.317
1.785
[165] 0.711
1.196 1.144
1.036
[169] 1.285
1.070 1.076
0.758
[173] 0.348
0.826 0.923
1.108
[177] 1.294
1.320 1.061
0.418
[181] 1.205
0.212 1.315
1.186
[185] 0.995
0.914 0.728
1.068
[189] 0.896
0.881 0.483
0.490
[193] 1.095
1.379 0.832
1.101
[197] 0.876
0.992 1.013
0.873
[201] 1.065
0.621 1.041
1.108
[205] 1.114
1.082 0.851
1.085
[209] 1.390
1.406 1.163
1.387
[213] 1.357
0.463 0.547
1.277
[217] 1.108
0.996 1.085
1.391
[221] 1.075
0.913 1.299
1.259
[225] 1.320
1.122 1.491
1.298
[229] 1.112
1.305 1.133
1.180
[233] 1.284
1.276 1.099
0.881
[237] 1.000
1.173 1.130
1.084
[241] 0.999
1.235 1.119
1.049
[245] 1.089
1.233 1.304
1.280
[249] 1.208
0.874 0.962
1.372
[253] 1.224
1.117 1.121
1.480
[257] 1.675
1.298 0.996
1.306
[261] 1.027
0.823 1.424
1.041
[265] 0.463
1.130 0.909
1.369
[269] 0.982
1.080 1.419
1.286
[273] 1.581
0.875 0.359
0.319
[277] 0.874
1.145 0.807
0.964
[281] 0.892
0.442 0.948
1.013
[285] 0.897
1.153 1.145
0.628
[289] 0.325
1.325 1.047
0.911
[293] 1.376
0.975 1.099
0.632
[297] 0.934
1.175 0.810
0.855
[301] 1.407
1.126 1.148
0.787
[305] 0.835
1.101 0.761
0.907
[309] 1.149
0.865 0.785
1.250
[313] 0.646
0.937 0.925
0.792
[317] 1.212
0.987 0.409
1.062
[321] 0.634
1.006 1.210
1.315
[325] 0.960
0.470 1.010
0.729
[329] 1.212
0.851 1.114
1.016
[333] 0.954
0.380 1.178
1.251
[337] 1.194
1.103 1.258
0.836
[341] 1.136
0.884 0.498
0.084
[345] 1.286
0.490 1.037
0.986
[349] 1.073
0.381 1.001
0.878
[353] 1.136
0.783 0.917
0.802
[357] 0.866
0.728 1.264
1.203
[361] 1.402
1.347 1.234
1.069
[365] 1.356
1.526 1.345
0.790
[369] 1.500
0.752 0.940
1.121
[373] 1.186
1.065 1.164
1.469
[377] 0.817
0.185 1.433
1.555
[381] 1.201
1.317 0.955
1.005
[385] 0.901
0.821 0.479
0.750
[389] 0.182
0.936 1.058
1.074
[393] 0.934
0.903 0.309
0.786
[397] 0.585
0.811 0.969
1.089
[401] 0.581
0.990 0.900
0.800
[405] 0.771
0.919 0.800
0.658
[409] 0.328
0.698 0.929
0.677
[413] 0.401
1.109 0.274
0.668
[417] 0.960
0.221 1.025
1.083
[421] 0.593
0.994 0.861
0.588
[425] 0.923
1.107 0.693
0.882
[429] 0.591
0.660 1.075
1.146
[433] 0.965
0.795 1.061
0.946
[437] 0.705
0.744 1.063
1.182
[441] 1.136
1.229 0.653
0.892
[445] 0.696
0.465 0.962
1.170
[449] 0.911
1.293 1.088
0.853
[453] 1.146
0.578 0.900
0.975
[457] 1.191
0.481 0.155
1.455
[461] 1.233
0.930 1.131
1.304
[465] 1.393
1.128 0.801
1.619
[469] 1.423
1.606 1.395
1.291
[473] 1.456
1.674 1.256
1.135
[477] 1.190
1.167 1.065
1.292
[481] 0.575
1.505 1.239
0.993
[485] 0.925
0.988 1.171
1.133
[489] 1.412
1.070 1.272
0.790
[493] 1.082
1.179 1.109
1.588
[497] 1.053
1.123 1.246
1.361
[501] 0.860
0.146 1.252
1.350
[505] 0.907
1.464 1.067
0.827
[509] 0.769
0.875 0.668
0.999
[513] 1.252
1.439 1.206
0.797
[517] 0.724
0.867 1.333
1.306
[521] 1.058
1.440 1.239
1.611
[525] 1.403
0.754 0.129
1.075
[529] 0.841
0.752 1.446
1.010
[533] 1.034
1.016 0.396
1.101
[537] 0.645
1.342 1.146
0.943
[541] 0.755
1.406 0.860
0.890
[545] 1.010
0.850 0.444
0.573
[549] 0.190
0.985 0.873
1.209
[553] 0.689
0.604 1.035
1.120
[557] 1.138
0.935 0.268
1.051
[561] 0.935
0.679 0.909
0.819
[565] 1.106
1.024 1.352
0.796
[569] 1.122
1.472 1.342
1.404
[573] 0.978
0.612 1.077
1.020
[577] 1.311
1.279 0.648
1.193
[581] 0.761
1.070 0.716
0.804
[585] 1.326
1.551 0.858
0.406
[589] 0.851
1.007 0.955
0.612
[593] 1.029
0.619 1.024
1.256
[597] 1.022
1.063 0.631
0.788
[601] 1.154
1.336 1.206
0.955
[605] 0.992
0.680 1.042
1.225
[609] 1.762
1.018 0.684
0.097
[613] 1.079
0.888 1.080
1.205
[617] 0.927
0.926 1.320
1.407
[621] 1.014
0.812 1.152
1.351
[625] 1.013
0.183 0.362
1.059
[629] 1.280
0.002 0.938
1.009
[633] 0.830
1.300 1.058
0.691
[637] 0.809
0.217 0.157
0.588
[641] 0.748
1.109 1.096
0.626
[645] 0.907
0.767 1.178
0.887
[649] 0.599
0.930 1.149
1.052
[653] 1.187
1.309 0.973
0.908
[657] 1.330
0.624 1.660
0.967
[661] 1.397
1.289 1.587
1.517
[665] 1.254
1.077 1.147
1.234
[669] 1.646
1.657 1.844
1.288
[673] 0.875
1.053 1.229
1.051
[677] 1.665
0.298 1.272
1.277
[681] 1.458
1.139 0.613
0.091
[685] 0.803
0.251 0.877
0.875
[689] 0.909
0.371 1.433
1.517
[693] 1.119
1.316 1.265
1.187
[697] 1.225
1.064 0.793
1.148
[701] 0.761
1.264 0.681
1.103
[705] 0.339
0.930 1.182
1.540
[709] 1.397
1.429 0.573
1.658
[713] 1.243
1.339 1.433
1.484
[717] 0.652
1.185 1.416
1.365
[721] 0.959
1.065 1.047
1.396
[725] 0.215
1.383 0.943
1.474
[729] 1.136
1.134 1.339
1.633
[733] 0.853
1.684 1.172
1.730
[737] 1.850
1.555 1.422
0.894
[741] 0.578
1.081 0.738
1.175
[745] 1.247
0.306 1.275
0.752
[749] 1.071
0.632 0.702
1.505
[753] 0.729
0.918 0.410
0.373
[757] 0.601
1.158 0.571
1.324
[761] 0.267
1.039 0.803
0.886
[765] 0.511
0.723 1.045
1.121
[769] 0.959
1.006 0.829
0.970
[773] 1.360
1.048 1.179
0.542
[777] 1.229
0.630 0.360
0.790
[781] 1.051
0.660 1.181
1.512
[785] 1.302
1.403 1.289
0.914
[789] 1.020
0.916 0.026
0.749
[793] 0.837
0.357 0.591
0.555
[797] 0.560
0.791 0.691
0.585
[801] 0.741
0.967 0.906
0.865
[805] 1.161
0.563 1.045
0.691
[809] 0.957
1.117 1.269
0.638
[813] 1.119
0.810 1.272
0.007
[817] 0.801
1.149 0.423
1.400
[821] 0.954
0.905 1.349
1.342
[825] 0.496
0.615 0.463
0.857
[829] 1.263
1.022 0.952
0.807
[833] 1.007
1.069 1.425
0.377
[837] 0.661
0.896 1.373
1.205
[841] 1.387
1.514 0.719
1.183
[845] 0.726
1.178 1.102
1.185
[849] 1.497
0.687 1.377
1.438
[853] 1.564
1.224 0.617
1.647
[857] 1.640
0.849 0.870
1.004
[861] 0.769
0.650 0.962
0.433
[865] 1.129
1.427 0.702
0.964
[869] 1.326
1.012 0.754
0.791
[873] 0.559
1.027 0.420
1.436
[877] 0.729
0.964 1.282
1.053
[881] 0.943
0.427 0.161
0.839
[885] 1.160
0.908 1.477
1.292
[889] 1.344
1.354 0.546
1.412
[893] 0.451
1.158 1.526
1.626
[897] 1.221
0.861 1.027
0.584
[901] 0.133
0.834 1.111
1.212
[905] 1.366
1.586 1.153
0.523
[909] 0.712
1.042 1.082
1.675
[913] 1.236
1.125 0.328
1.316
[917] 1.116
0.929 1.077
1.003
[921] 1.263
0.752 1.231
0.491
[925] 1.139
1.417 1.472
1.156
[929] 1.080
1.619 1.004
1.077
[933] 0.425
0.914 1.041
1.242
[937] 1.356
0.737 0.927
0.853
[941] 1.294
1.307 1.197
0.847
[945] 0.733
0.400 1.038
0.944
[949] 1.237
1.299 1.126
0.534
[953] 1.394
1.323 1.007
1.642
[957] 1.043
1.045 0.971
1.219
[961] 1.091
0.482 0.927
1.104
[965] 1.194
1.445 1.442
1.300
[969] 0.800
0.206 1.321
1.233
[973] 0.986
0.521 1.177
0.191
[977] 0.896
0.666 0.880
1.023
[981] 1.592
0.764 0.851
0.783
[985] 0.869
0.606 1.160
0.946
[989] 0.628
0.897 1.067
1.046
[993] 1.368
1.624 1.719
1.029
[997] 0.912
0.974 1.620
1.558
[ reached
getOption("m
ax.print") --
omitted 6980
entries ]
[1] 7980
[1] 0
[1] 1.908
[1] 219
>mandms “mandms” contiene datos sobre la
distribución de color en una bolsa de blue brown
M&M’s como porcentajes para varios milk
>names(which(rowSums(mandms== tipos de paquetes. chocolate
0)==1)) 10.0000
Con 30.0000
> “names(which(rowSums(mandms==0 Peanut
names(which(rowSums(mandms==r )==1))” conocemos a cual de los 20.0000
owMeans(mandms))==6)) paquetes le hace falta un color. 20.0000
Peanut Butter
Con 20.0000
> “names(which(rowSums(mandms==r 20.0000
names(which(rowSums(mandms== owMeans(mandms))==6))” Almond
max(mandms))==1)) conocemos cual paquete posee una 16.6667
distribución igual de colores. 16.6667
>names(which(colSums(mandms== kid minis
max(mandms))==1)) Con 16.6667
“names(which(rowSums(mandms== 16.6667
max(mandms))==1))” da a conocer el
paquete con el color mas común que green orange
cualquier otro. milk
chocolate
>Con 10.0000
“names(which(colSums(mandms==m 10.0000
ax(mandms))==1))” conocemos dicho Peanut
color. 10.0000
10.0000
Peanut Butter
20.0000
0.0000
Almond
16.6667
16.6667
kid minis
16.6667
16.6667
red yellow
milk
chocolate
20.0000
20.0000
Peanut
20.0000
20.0000
Peanut Butter
20.0000
20.0000
Almond
16.6667
16.6667
kid minis
16.6667
16.6667
[1] "Peanut
Butter"
[1] "Almond"
"kid minis"
[1] "milk
chocolate"
[1] "brown"
> data("nym.2002") En “data(“nym.2002”) se hace [1] 1000
> length(nym.2002$time) referencia al lugar donde se almacenan
los datos de los tiempos registrados en [1] 147.3333
> fastest<-min(nym.2002$time) la maratón.
> fastest [1] "2:27"
Con “length(nym.2002$time)”
> paste(fastest %/% 60, obtenemos la cantidad de tiempos [1] 566.7833
round(fastest %% 60),sep=":") almacenados en el data set.
[1] "9:27"
> slowest <- max(nym.2002$time) Con “fastest<-min(nym.2002$time)” y
> slowest “fastest” obtenemos el tiempo mas
rápido.
> paste(slowest %/% 60,
round(slowest %% 60), sep=":") “paste(fastest %/% 60, round(fastest
[1] "9:27" %% 60),sep=":")” es la función que
nos permite hacer la conversión a
horas y minutos.
[1] 3710
[1] 135
[1] "1790"
"1800"
"1810"
"1820"
[5] "1830"
"1840"
"1850"
"1860"
[9] "1870"
"1880"
"1890"
"1900"
[13] "1910"
"1920"
"1930"
"1940"
[17] "1950"
"1960"
"1970"
Time Series:
Start = 1800
End = 1970
Frequency =
0.1
[1] 1.38
1.93 2.40
3.26
[5] 4.20
6.10 8.20
8.40
[9] 10.40
12.70 13.10
16.00
[13] 13.70
17.10 8.90
19.60
[17] 28.00
23.90
[1] 1.38