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.

2. R код блогы

“{r mean-example}” mean(c(1, 2, 3, 4, 5))

3. Формула

Орташа мән формуласы:

\[ \bar{x} = \frac{1}{n} \sum_{i=1}^n x_i \]

4. График (plot және ggplot)

Base R графигі

“{r base-plot}” plot(1:10, 1:10, main = “Сызықтық график (Base R)”)

ggplot графигі

“{r ggplot-example}” library(ggplot2) ggplot(mtcars, aes(wt, mpg)) + geom_point() + ggtitle(“MPG depending on Weight (ggplot2)”)

5. Тізімдер және кесте

Маркерленген тізім

“- Бірінші элемент” “- Екінші элемент”
“- Үшінші элемент”

Кесте

Аты
Даниял 20
Ислам 22

6. Код блогы параметрлерін демонстрациялау

echo = FALSE (код көрінбейді)

“{r echo-false, echo=FALSE}” mean(1:10)

eval = FALSE (код орындалмайды)

“{r eval-false, eval=FALSE}” “mean(1:10)”

message = FALSE

“{r message-false, message=FALSE}” library(ggplot2)

warning = FALSE

“{r warning-false, warning=FALSE}” log(-1)

7. Бірнеше график (hist, boxplot, density)

Гистограмма

“{r hist-plot}” hist(mtcars$mpg, main = “MPG Histogram”)

Boxplot

“{r box-plot}” boxplot(mtcars$mpg, main = “MPG Boxplot”)

Density графигі

“{r density-plot}” plot(density(mtcars$mpg), main = “MPG Density Plot”)

8. Inline код

“r mean(c(1,2,3,4,5))”