forked from openalea/strawberry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.Rhistory
335 lines (335 loc) · 13 KB
/
.Rhistory
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
knitr::opts_chunk$set(echo = TRUE)
dataset<- read.csv(file = "c:/Users/mlabadie/Documents/GitHub/strawberry/example/Formation/Dataset_module_scale.csv")
View(dataset)
dataset<- read.csv(file = "c:/Users/mlabadie/Documents/GitHub/strawberry/example/Formation/Dataset_module_scale.csv",
sep = ";")
View(dataset)
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Analysis_functions.R")
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Plot_representation_functions.R")
library(knitr)
library(rmarkdown)
library(ggplot2)
library(VIM)
library(mice)
library(dplyr)
library(scales)
library(reshape)
library(gtable)
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Analysis_functions.R")
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Plot_representation_functions.R")
names(dataset)
str(dataset)
interger.variable<- colnames(dataset[,1:6])
interger.variable<- colnames(dataset[,6:12])
interger.variable<- colnames(dataset[,7:12])
interger.variable
index.variable<- colnames(dataset[2:5])
index.variable
index.variable<- colnames(dataset[2:4])
index.variable
fc_summary.data(data = dataset,varname = interger.variable,index.variable = index.variable)
index.variable<- colnames(dataset[2:5])
index.variable
index.variable<- colnames(dataset[2:4,6])
index.variable
index.variable<- colnames(dataset[,c(2:4,6)])
index.variable
fc_summary.data(data = dataset,varname = interger.variable,index.variable = index.variable)
t<-fc_summary.data(data = dataset,varname = interger.variable,index.variable = index.variable)
fc_plot.summary.data(data = t,Sd = T,idx.variable = "order",modality = "modality",design = Newphytol_theme,color = "modality",linetype = c("solid","dashed"))
interger.variable<- colnames(dataset[,7:15])
index.variable<- colnames(dataset[,c(2:4,6)])
index.variable
t<-fc_summary.data(data = dataset,varname = interger.variable,index.variable = index.variable)
fc_plot.summary.data(data = t,Sd = T,idx.variable = "order",modality = "modality",design = Newphytol_theme,color = "modality",linetype = c("solid","dashed"))
interger.variable
interger.variable<- colnames(dataset[,7:16])
interger.variable
t<-fc_summary.data(data = dataset,varname = interger.variable,index.variable = index.variable)
fc_plot.summary.data(data = t,Sd = T,idx.variable = "order",modality = "modality",design = Newphytol_theme,color = "modality",linetype = c("solid","dashed"))
ggplot(data = t,mapping = aes(x = order,y = nb_stolons.mean, color=genotype))+
geom_point()+
geom_line()
ggplot(data = t,mapping = aes(x = "order",y = "nb_stolons.mean", color=genotype))+
geom_point()+
geom_line()
ggplot(data = t,mapping = aes(x = "order",y = "nb_stolons.mean", color=Genotype))+
geom_point()+
geom_line()
ggplot(data = t,mapping = aes(x = order,y = nb_stolons.mean, color=Genotype))+
geom_point()+
geom_line()
ggplot(data = t,mapping = aes(x = order,y = nb_stolons.mean, color=modality))+
geom_point()+
geom_line()
ggplot(data = t,mapping = aes(x = order,y = nb_visible_leaf.mean, color=modality))+
geom_point()+
geom_line()
ggplot(data = t,mapping = aes(x = order,y = nb_visible_leaves.mean, color=modality))+
geom_point()+
geom_line()
t
fc_dist_module_by_order<-function(data, index){
t<- table(data[,"genotype"],
data[,"Index"])
t<-data.frame(matrix(data = t,nrow = nrow(t),ncol = ncol(t)))
colnames(t)<- levels(x = data[,index])
row.names(t)<- c(levels(x = data$genotype))
t[,"Frequency"]<-rowSums(t)
t["Frequency",]<-colSums(t)
return(t)
}
fc_dist_module_by_order(data = dataset,index = "order")
fc_dist_module_by_order<-function(data, index){
t<- table(data[,"Genotype"],
data[,"Index"])
t<-data.frame(matrix(data = t,nrow = nrow(t),ncol = ncol(t)))
colnames(t)<- levels(x = data[,index])
row.names(t)<- c(levels(x = data$Genotype))
t[,"Frequency"]<-rowSums(t)
t["Frequency",]<-colSums(t)
return(t)
}
fc_dist_module_by_order(data = dataset,index = "order")
fc_dist_module_by_order(data = dataset,index = "Order")
table(dataset[,"Genotype"],dataset[,"order"])
table(dataset[,"Genotype"],dataset[,"date"])
table(dataset[,"Genotype"],dataset[,"order"])
table(t[,"Genotype"],t[,"order"])
table(dataset[,"Genotype"],dataset[,"order"])
t<-table(dataset[,"Genotype"],dataset[,"order"])
t<-table(dataset[,"Genotype"],dataset[,"order"])
t<-data.frame(matrix(data = t,nrow = nrow(t),ncol = ncol(t)))
colnames(t)<- levels(x = dataset[,index])
colnames(t)<- levels(x = dataset[,"order"])
t<-table(dataset[,"Genotype"],dataset[,"order"])
t<-data.frame(matrix(data = t,nrow = nrow(t),ncol = ncol(t)))
colnames(t)<- levels(x = dataset[,"order"])
row.names(t)<- c(levels(x = dataset$Genotype))
t
index.variable
dataset[,index.variable]<- as.factor(x = dataset[,index.variable])
for (i in 1:length(index.variable)){
dataset[,index.variable]<- as.factor(x = dataset[,index.variable])
}
t<-table(dataset[,"Genotype"],dataset[,"order"])
t<-data.frame(matrix(data = t,nrow = nrow(t),ncol = ncol(t)))
colnames(t)<- levels(x = dataset[,"order"])
row.names(t)<- c(levels(x = dataset$Genotype))
t
t<-table(dataset[,"Genotype"],dataset[,"order"])
t
tab<-table(dataset[,"Genotype"],dataset[,"order"])
t<-data.frame(matrix(data = t,nrow = nrow(t),ncol = ncol(t)))
colnames(t)<- levels(x = dataset[,"order"])
row.names(t)<- c(levels(x = dataset$Genotype))
tab
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab<-data.frame(matrix(data = tab,nrow = nrow(tab),ncol = ncol(tab)))
colnames(tab)<- levels(x = dataset[,"order"])
row.names(tab)<- c(levels(x = dataset$Genotype))
tab
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab
knitr::opts_chunk$set(echo = TRUE)
setwd(dir = "c:/Users/mlabadie/Documents/GitHub/Rscript/Strawberry/Phenological Study/")
install.packages("VIM")
install.packages("mice")
install.packages("reshape")
library(knitr)
library(rmarkdown)
library(ggplot2)
library(VIM)
library(mice)
library(dplyr)
library(scales)
library(reshape)
library(gtable)
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Analysis_functions.R")
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Plot_representation_functions.R")
Sys.setlocale(category = "LC_TIME",locale = "English")
dataset<- read.csv(file = "c:/Users/mlabadie/Documents/GitHub/strawberry/example/Formation/Dataset_module_scale.csv",
sep = ";")
str(dataset)
interger.variable<- colnames(dataset[,7:16])
index.variable<- colnames(dataset[,c(2:4,6)])
index.variable
for (i in 1:length(index.variable)){
dataset[,index.variable]<- as.factor(x = dataset[,index.variable])
}
t<-fc_summary.data(data = dataset,varname = interger.variable,index.variable = index.variable)
fc_plot.summary.data(data = t,Sd = T,idx.variable = "order",modality = "modality",design = Newphytol_theme,color = "modality",linetype = c("solid","dashed"))
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab
fc_plot.summary.data(data = t,Sd = T,idx.variable = "order",modality = "modality",design = Newphytol_theme,color = "modality",linetype = c("solid","dashed"))
knitr::opts_chunk$set(echo = TRUE)
setwd(dir = "c:/Users/mlabadie/Documents/GitHub/Rscript/Strawberry/Phenological Study/")
install.packages("VIM")
install.packages("mice")
install.packages("reshape")
library(knitr)
library(rmarkdown)
library(ggplot2)
library(VIM)
library(mice)
library(dplyr)
library(scales)
library(reshape)
library(gtable)
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Analysis_functions.R")
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Plot_representation_functions.R")
Sys.setlocale(category = "LC_TIME",locale = "English")
dataset<- read.csv(file = "c:/Users/mlabadie/Documents/GitHub/strawberry/example/Formation/Dataset_module_scale.csv",
sep = ";")
str(dataset)
interger.variable<- colnames(dataset[,7:16])
index.variable<- colnames(dataset[,c(2:4,6)])
index.variable
for (i in 1:length(index.variable)){
dataset[,index.variable]<- as.factor(x = dataset[,index.variable])
}
install.packages("VIM")
knitr::opts_chunk$set(echo = TRUE,
warning = FALSE,
message = FALSE,
dpi = 800,
fig.pos = "h")
library(plyr)
library(ggplot2)
library(gtable)
library(grid)
library(cowplot)
library(reshape2)
library(scales)
library(knitr)
library(tinytex)
library(dplyr)
#library(RCurl)
library(rmarkdown)
library(lmtest)
library(agricolae)
str(dataset)
knitr::opts_chunk$set(echo = TRUE)
setwd(dir = "c:/Users/mlabadie/Documents/GitHub/Rscript/Strawberry/Phenological Study/")
install.packages("VIM")
install.packages("mice")
install.packages("reshape")
library(knitr)
library(rmarkdown)
library(ggplot2)
library(VIM)
library(mice)
library(dplyr)
library(scales)
library(reshape)
library(gtable)
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Analysis_functions.R")
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Plot_representation_functions.R")
Sys.setlocale(category = "LC_TIME",locale = "English")
dataset<- read.csv(file = "c:/Users/mlabadie/Documents/GitHub/strawberry/example/Formation/Dataset_module_scale.csv",
sep = ";")
str(dataset)
interger.variable<- colnames(dataset[,7:16])
index.variable<- colnames(dataset[,c(2:4,6)])
index.variable
for (i in 1:length(index.variable)){
dataset[,index.variable]<- as.factor(x = dataset[,index.variable])
}
for (i in 1:length(index.variable)){
dataset[,index.variable[i]]<- as.factor(x = dataset[,index.variable[i]])
}
str(dataset)
knitr::opts_chunk$set(echo = TRUE)
setwd(dir = "c:/Users/mlabadie/Documents/GitHub/Rscript/Strawberry/Phenological Study/")
install.packages("VIM")
install.packages("mice")
install.packages("reshape")
library(knitr)
library(rmarkdown)
library(ggplot2)
library(VIM)
library(mice)
library(dplyr)
library(scales)
library(reshape)
library(gtable)
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Analysis_functions.R")
source(file = "c:/Users/mlabadie/Documents/GitHub/Rscript/Function/Plot_representation_functions.R")
Sys.setlocale(category = "LC_TIME",locale = "English")
dataset<- read.csv(file = "c:/Users/mlabadie/Documents/GitHub/strawberry/example/Formation/Dataset_module_scale.csv",
sep = ";")
str(dataset)
interger.variable<- colnames(dataset[,7:16])
index.variable<- colnames(dataset[,c(2:4,6)])
index.variable
for (i in 1:length(index.variable)){
dataset[,index.variable[i]]<- as.factor(x = dataset[,index.variable[i]])
}
str(dataset)
t<-fc_summary.data(data = dataset,varname = interger.variable,index.variable = index.variable)
fc_plot.summary.data(data = t,Sd = T,idx.variable = "order",modality = "modality",design = Newphytol_theme,color = "modality",linetype = c("solid","dashed"))
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab<-data.frame(matrix(data = tab,nrow = nrow(tab),ncol = ncol(tab)))
colnames(tab)<- levels(x = tab[,index])
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab<-data.frame(matrix(data = tab,nrow = nrow(tab),ncol = ncol(tab)))
colnames(tab)<- levels(x = dataset[,index])
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab<-data.frame(matrix(data = tab,nrow = nrow(tab),ncol = ncol(tab)))
colnames(tab)<- levels(x = dataset[,index])
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab1<-data.frame(matrix(data = tab,nrow = nrow(tab),ncol = ncol(tab)))
colnames(tab)<- levels(x = dataset[,index])
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab1<-data.frame(matrix(data = tab,nrow = nrow(tab),ncol = ncol(tab)))
colnames(tab)<- levels(x = dataset[,"order"])
row.names(tab)<- levels(x =dataset[,"Genotype"])
tab1
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab1<-data.frame(matrix(data = tab,nrow = nrow(tab),ncol = ncol(tab)))
colnames(tab1)<- levels(x = dataset[,"order"])
row.names(tab1)<- levels(x =dataset[,"Genotype"])
tab1
View(tab1)
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab1<-data.frame(matrix(data = tab,nrow = nrow(tab),ncol = ncol(tab)))
colnames(tab1)<- levels(x = dataset[,"order"])
row.names(tab1)<- levels(x =dataset[,"Genotype"])
tab1[,"Frequency"]<-rowSums(tab1)
tab1["Frequency",]<-colSums(tab1)
tab1
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab1<-data.frame(matrix(data = tab,nrow = nrow(tab),ncol = ncol(tab)))
colnames(tab1)<- c("gentoype",levels(x = dataset[,"order"]))
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab1<-data.frame(matrix(data = tab,nrow = nrow(tab),ncol = ncol(tab)+1))
colnames(tab1)<- c("gentoype",levels(x = dataset[,"order"]))
tab1[,"Frequency"]<-rowSums(tab1)
tab1["Frequency",]<-colSums(tab1)
tab1
tab<-table(dataset[,"Genotype"],dataset[,"order"])
tab1<-data.frame(matrix(data = tab,nrow = nrow(tab),ncol = ncol(tab)))
colnames(tab1)<- levels(x = dataset[,"order"])
row.names(tab1)<- levels(x =dataset[,"Genotype"])
tab1[,"Frequency"]<-rowSums(tab1)
tab1["Frequency",]<-colSums(tab1)
tab1
prop.table(x = tab1,margin = 2)
prop.table(x = tab,margin = 2)
prop.table(x = tab,margin = 1)
tab_melt<-melt(data = tab)
tab_melt
ggplot(data = tab_melt,mapping = aes(x = Var2,y = value,color=Var1))
ggplot(data = tab_melt,mapping = aes(x = Var2,y = value,color=Var1))+
geom_point()
ggplot(data = tab_melt,mapping = aes(x = Var2,y = value,color=Var1))+
geom_point()+
geom_line()
tab_melt
tab.prob<-prop.table(x = tab,margin = 1)
tab_melt<-melt(data = tab.prob)
ggplot(data = tab_melt,mapping = aes(x = Var2,y = value,color=Var1))+
geom_point()+
geom_line()