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
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.
datos=c(87.75,74,85,86,86,74,88,74,92.5,91,81,93.33,89,88,74,79,92.5,94.8,84,81.5,85,84.5,80,82.5,91.5,82,83.5,79.9,89,92,83,80,85,86.33,83,82,85,80)
datos
## [1] 87.75 74.00 85.00 86.00 86.00 74.00 88.00 74.00 92.50 91.00 81.00
## [12] 93.33 89.00 88.00 74.00 79.00 92.50 94.80 84.00 81.50 85.00 84.50
## [23] 80.00 82.50 91.50 82.00 83.50 79.90 89.00 92.00 83.00 80.00 85.00
## [34] 86.33 83.00 82.00 85.00 80.00
mean(datos)
## [1] 84.46342
84.46342
## [1] 84.46342
mean
## function (x, ...)
## UseMethod("mean")
## <bytecode: 0x0000000010fc40c0>
## <environment: namespace:base>
median(datos)
## [1] 84.75
84.75
## [1] 84.75
median
## function (x, na.rm = FALSE, ...)
## UseMethod("median")
## <bytecode: 0x000000000f94e918>
## <environment: namespace:stats>
moda=table(datos)
moda
## datos
## 74 79 79.9 80 81 81.5 82 82.5 83 83.5 84 84.5
## 4 1 1 3 1 1 2 1 2 1 1 1
## 85 86 86.33 87.75 88 89 91 91.5 92 92.5 93.33 94.8
## 4 2 1 1 2 2 1 1 1 2 1 1
histograma=hist(datos)
histograma
## $breaks
## [1] 70 75 80 85 90 95
##
## $counts
## [1] 4 5 14 8 7
##
## $density
## [1] 0.02105263 0.02631579 0.07368421 0.04210526 0.03684211
##
## $mids
## [1] 72.5 77.5 82.5 87.5 92.5
##
## $xname
## [1] "datos"
##
## $equidist
## [1] TRUE
##
## attr(,"class")
## [1] "histogram"
maximo=max(datos)
maximo
## [1] 94.8
minimo=min(datos)
minimo
## [1] 74
r varianza=var(datos) varianza
## [1] 30.82647
desviacion=sd(datos)
desviacion
## [1] 5.552159
cuartiles=quantile(datos,c(.25, .50, .75, .80))
cuartiles
## 25% 50% 75% 80%
## 81.125 84.750 88.000 89.000
frecuencia=plot(datos)
frecuencia
## NULL
rango=range(datos)
rango
## [1] 74.0 94.8