<!---
##=============================================================================
## Estatística Computacional I                            www.leg.ufpr.br/ce083
## Curso de Estatística - 2014/1
##                                                         Prof. Walmes Zeviani
##                                                            LEG - DEST - UFPR
##
## Aula 14                                                         (03/04/2014)
##    * Pesquisa reproduzível;
##    * Relatórios dinâmicos com R+Markdown. 
##=============================================================================
-->

Primeiro arquivo R+Mardown
========================================================

This is an R Markdown document. Markdown is a simple formatting syntax
for authoring web pages (click the **MD** toolbar button for help on
Markdown).

When you click the **Knit HTML** button a web page 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:

Abaixo está o chunk que configura o prefixo das figuras e a largura do
código. No entando esse chunk não será exibido.



Abaixo o primeiro chunk que será exibido, o resumo do data.frame cars. 


```r
##-----------------------------------------------------------------------------
summary(cars)
```

```
##      speed           dist    
##  Min.   : 4.0   Min.   :  2  
##  1st Qu.:12.0   1st Qu.: 26  
##  Median :15.0   Median : 36  
##  Mean   :15.4   Mean   : 43  
##  3rd Qu.:19.0   3rd Qu.: 56  
##  Max.   :25.0   Max.   :120
```


You can also embed plots, for example:


```r
##-----------------------------------------------------------------------------
plot(cars, main="grafico")
```

![plot of chunk graph](figure/prefix-graph.png) 


Uma lista numerada:
 1. Primeiro item; 
 2. Segundo item;
 3. Terceiro item.

Uma lista de tópicos:
 * Um;
 * Dois; 
 * Três.

Uma lista de tópicos aninhada.
 * Bullet 1
 * Bullet 2
   * Bullet 2a
   * Bullet 2b
 * Bullet 3

Uma lista numerada aninhada.
 1. Dog
     1. German Shepherd
     2. Belgian Shepherd
         1. Malinois
         2. Groenendael
         3. Tervuren
 2. Cat
     1. Siberian
     2. Siamese

Uma lista mista.
 * First level unordered list item
     1. Second level ordered list item

Inserindo um link no documento.
[text to link](http://example.com/)

Inserindo uma tabela.

| Tables        | Are           | Cool  |
| ------------- |:-------------:| -----:|
| col 3 is      | right-aligned | $1600 |
| col 2 is      | centered      |   $12 |
| zebra stripes | are neat      |    $1 |

Sem mostrar o input usando `echo=FALSE`.


```
##   Sepal.Length   Sepal.Width    Petal.Length   Petal.Width 
##  Min.   :4.30   Min.   :2.00   Min.   :1.00   Min.   :0.1  
##  1st Qu.:5.10   1st Qu.:2.80   1st Qu.:1.60   1st Qu.:0.3  
##  Median :5.80   Median :3.00   Median :4.35   Median :1.3  
##  Mean   :5.84   Mean   :3.06   Mean   :3.76   Mean   :1.2  
##  3rd Qu.:6.40   3rd Qu.:3.30   3rd Qu.:5.10   3rd Qu.:1.8  
##  Max.   :7.90   Max.   :4.40   Max.   :6.90   Max.   :2.5  
##        Species  
##  setosa    :50  
##  versicolor:50  
##  virginica :50  
##                 
##                 
## 
```


Sem mostrar o output usando `results="hide"`.


```r
summary(iris)
```


Sem avaliar o código.

```r
rnorm(10000)
```





A média do comprimento de sépalas foi de 5.8433 e o desvio-padrão de 0.8281.

O aluno obteve nota 5.8 e postanto foi **não aprovado**.

A média amostral $latex \bar{x}$  é 
$$latex \bar{x} = \frac{\sum_{i=1}^{n} X_i}{n}. $$
