-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtest_report.Rmd
79 lines (50 loc) · 1.1 KB
/
test_report.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
---
title: "Test report"
author: "M. Salmon"
date: "January 8, 2017"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = FALSE)
```
## R Markdown
```{r cars}
summary(cars)
```
## Including Plots
You can also embed plots, for example:
```{r pressure, echo=FALSE}
plot(pressure)
```
# Here is the first section
## Here is the first sub-section
I want to put *these words* in bold and _these ones_ in italic.
I want this command to look like one `summary(cars)`.
I also want to write a list
- Element 1
- Element 2
# Now I want to show a table but in a pretty way
```{r ugly table}
head(cars)
```
```{r pretty table}
knitr::kable(head(cars) )
```
What if I want to write in the text the size of my data? Better not to copy-paste. There are `r nrow(cars)` entries in my dataset.
## Regression
```{r regression}
model <- lm(speed ~ dist, data = cars)
model$coefficients
library("broom")
tidy(model)
knitr::kable(tidy(model))
summary(model)
knitr::kable(glance(model))
```
## Figure options
```{r fig1, fig.width = 5}
plot(cars)
```
```{r fig2, fig.width = 10}
plot(cars)
```