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:

\[ a^{2}+2ab+b^{2}=(a+b)^{2} \] \[ \color {red} {[x=(-b\pm\sqrt{b^{2}-4ac})/2a]} \]

base <- cars
data.frame(base,5)
##    speed dist X5
## 1      4    2  5
## 2      4   10  5
## 3      7    4  5
## 4      7   22  5
## 5      8   16  5
## 6      9   10  5
## 7     10   18  5
## 8     10   26  5
## 9     10   34  5
## 10    11   17  5
## 11    11   28  5
## 12    12   14  5
## 13    12   20  5
## 14    12   24  5
## 15    12   28  5
## 16    13   26  5
## 17    13   34  5
## 18    13   34  5
## 19    13   46  5
## 20    14   26  5
## 21    14   36  5
## 22    14   60  5
## 23    14   80  5
## 24    15   20  5
## 25    15   26  5
## 26    15   54  5
## 27    16   32  5
## 28    16   40  5
## 29    17   32  5
## 30    17   40  5
## 31    17   50  5
## 32    18   42  5
## 33    18   56  5
## 34    18   76  5
## 35    18   84  5
## 36    19   36  5
## 37    19   46  5
## 38    19   68  5
## 39    20   32  5
## 40    20   48  5
## 41    20   52  5
## 42    20   56  5
## 43    20   64  5
## 44    22   66  5
## 45    23   54  5
## 46    24   70  5
## 47    24   92  5
## 48    24   93  5
## 49    24  120  5
## 50    25   85  5
head(base,5)
##   speed dist
## 1     4    2
## 2     4   10
## 3     7    4
## 4     7   22
## 5     8   16
tail(base,5)
##    speed dist
## 46    24   70
## 47    24   92
## 48    24   93
## 49    24  120
## 50    25   85
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.