R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

summary(cars)
##      speed           dist       
##  Min.   : 4.0   Min.   :  2.00  
##  1st Qu.:12.0   1st Qu.: 26.00  
##  Median :15.0   Median : 36.00  
##  Mean   :15.4   Mean   : 42.98  
##  3rd Qu.:19.0   3rd Qu.: 56.00  
##  Max.   :25.0   Max.   :120.00

Including Plots

You can also embed plots, for example:

Note that the echo = FALSE parameter was added to the code chunk to prevent printing of the R code that generated the plot.

#PRIMER EJERCICIO DE PROBABILIDAD Y ESTADISTICA: TABLAS, HISTOGRAMAS Y POLIGONOS DE DISTRIBUCIONES DE FRECUENCIA

Este ejercicio usa datos de los normales climatologicos del periodo de 1951 a 2010 de ciudad obregon, Sonora, estacion Obregon DGE

Importar datos

ob <- c( 17.4,     18.6,     20.3,     23.5,     26.9,     30.6,     31.9,     31.6,     31.0,     27.5,     22.1,     17.9 )

Ordenar datos ##de menor a mayor

sort(ob, decreasing = FALSE)
##  [1] 17.4 17.9 18.6 20.3 22.1 23.5 26.9 27.5 30.6 31.0 31.6 31.9

Ordenar datos ##de mayor a menor

sort(ob, decreasing = TRUE)
##  [1] 31.9 31.6 31.0 30.6 27.5 26.9 23.5 22.1 20.3 18.6 17.9 17.4

###Histogramas, poligonos y tablas de distribuciones de frecuencia * Histograma de frecuencia absoluta

hist(ob)

TABLA de distribucion de frecuencia

library(fdth)
## 
## Attaching package: 'fdth'
## The following objects are masked from 'package:stats':
## 
##     sd, var
tabla <- fdt(ob)
tabla
##     Class limits f   rf rf(%) cf  cf(%)
##  [17.226,20.225) 3 0.25 25.00  3  25.00
##  [20.225,23.223) 2 0.17 16.67  5  41.67
##  [23.223,26.222) 1 0.08  8.33  6  50.00
##   [26.222,29.22) 2 0.17 16.67  8  66.67
##   [29.22,32.219) 4 0.33 33.33 12 100.00