-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPractice_2_Morris.Rmd
More file actions
59 lines (49 loc) · 1.09 KB
/
Copy pathPractice_2_Morris.Rmd
File metadata and controls
59 lines (49 loc) · 1.09 KB
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
---
title: "Practice_2"
author: "Meng-Hsin, Wu"
date: "2021/10/19"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
```
## R Markdown
```{r cars}
library(dplyr)
library(tidyr)
element1<-data.frame(
before_diet= c(104, 95, 87, 77, 112),
after_diet= c(96, 91, 81, 75, 118),
row.names = c('subject_1', 'subject_2', 'subject_3',
'subject_4', 'subject_5')
)
str(element1)
as.numeric(element1$before_diet)
as.numeric(element1$after_diet)
str(element1)
element1_2<- element1%>%pivot_longer(
everything(),
names_to= 'time',
values_to= 'weight',
)
str(element1_2)
element2_1<- c('subject_1', 'subject_2', 'subject_3',
'subject_4', 'subject_5')
element2_2<- c(c(element1$before_diet)-c(element1$after_diet) )
str(element2_1)
str(element2_2)
element2_3<-data.frame(
subject= element2_1,
weight_loss= element2_2
)
str(element2_2)
list2<-list(A= element2_1, B= element2_2,
C= element2_3 )
str(list2)
BUBBLE_DIET<- list(A= element1_2, B= list2)
str(BUBBLE_DIET)
BUBBLE_DIET
```
## Including Plots
```{r pressure, echo=FALSE}
```