Demostration

setwd("D:/OneDrive/_Current Working/R Collections/RMarkDown")

Who I am?

Hello, this is Win Khaing. 😄


Statistics addict

One of my friends said me:🤣

I am a Statistics addict.


Statistics

When you used r chunk for adding image, the following error can be found.

> knitr::include_graphics("coffee")
#> [1] "coffee"
#> attr(,"class")
#> [1] "knit_image_paths" "knit_asis"   

If you had this message, please confirm your director folder place. Or please try as follows…

Statistics

Statistics

Add image from Web

I am a computer addict with Coffee.

I am a computer addict with Coffee.

characteristics beta Standard Errors t-values p-values
constant 0.356 0.122 2.394 0.02
Drinking 0.567 0.211 4.503 <0.0001
Eating 0.495 0.111 3.563 0.456


It is also very easy to make tables with knitr’s kable function:

library("knitr")
library("dplyr")
library(kableExtra)

d1 = head(iris)
d2 = head(mtcars)
kable(d2[, 1:5], format = "pipe", padding = 2)
mpg cyl disp hp drat
Mazda RX4 21.0 6 160 110 3.90
Mazda RX4 Wag 21.0 6 160 110 3.90
Datsun 710 22.8 4 108 93 3.85
Hornet 4 Drive 21.4 6 258 110 3.08
Hornet Sportabout 18.7 8 360 175 3.15
Valiant 18.1 6 225 105 2.76

HTML table

kbl(d1, caption = "Demo Table ") %>%
  kable_styling(bootstrap_options = "striped",
                full_width = F) %>%
  add_header_above(c(" ", "Group 1" = 2, "Group 2*" = 2)) %>%
  footnote(c("__Group 2__ is Flower"))
Demo Table
Group 1
Group 2*
Sepal.Length Sepal.Width Petal.Length Petal.Width Species
5.1 3.5 1.4 0.2 setosa
4.9 3.0 1.4 0.2 setosa
4.7 3.2 1.3 0.2 setosa
4.6 3.1 1.5 0.2 setosa
5.0 3.6 1.4 0.2 setosa
5.4 3.9 1.7 0.4 setosa
Note:
Group 2 is Flower

************************☕ END ☕ *************************************