-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathBuild.R
More file actions
62 lines (31 loc) · 1.61 KB
/
Build.R
File metadata and controls
62 lines (31 loc) · 1.61 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
source('C:/Users/zakaria/Desktop/Intership/Program/Program/LoadPackage.R', echo=TRUE)
source('C:/Users/zakaria/Desktop/Intership/Program/Program/Signal.R', echo=TRUE)
source('C:/Users/zakaria/Desktop/Intership/Program/Program/Bloc.R', echo=TRUE)
source('C:/Users/zakaria/Desktop/Intership/Program/Program/DataClass.R', echo=TRUE)
source('C:/Users/zakaria/Desktop/Intership/Program/Program/RRClass.R', echo=TRUE)
source('C:/Users/zakaria/Desktop/Intership/Program/Program/AutClass.R', echo=TRUE)
source('C:/Users/zakaria/Desktop/Intership/Program/Program/Utils.R', echo=TRUE)
source('C:/Users/zakaria/Desktop/Intership/Program/Program/DataBase.R', echo=TRUE)
aut_file<-LoadAut("C:\\Data\\pravee1_aut.csv")
data_file<-LoadData("C:\\Data\\pravee1_data.csv")
rr_file <-LoadRR("C:\\Data\\pravee1_rr.csv")
paraSympMean<-autMean(aut_file@ParaSymp@val)
sympMean<-autMean(aut_file@Symp@val)
LFHF.ratio<-Cutaut(sympMean,paraSympMean)
LFHF.ratio<-LabelHRV(LFHF.ratio)
synchro.var<-synchro(nrow(LFHF.ratio),nrow(TemperatureMean1(data_file@Temp@val)))
Activity<-activityMean(data_file,synchro.var=synchro.var/10)
ActivityLab<-LabelActivity(Activity)
time<-seq(10, length=length(ActivityLab), by=10)
Time=data.frame(time)
for (i in 1:length(ActivityLab)) {
addExperimentation(1,1,Time[i,],ActivityLab[i,],LFHF.ratio[i,])
}
library(TraMineR)
data.exp <-LoadExperimentation(1,1)
data.seq <-CreateSequence(data.exp)
plotFullSequence(data.seq)
plotSequence(data.seq)
seqlegend(data.seq)
seqiplot(data.seq,cex.plot=0.8,withlegend = TRUE,cex.legend=0.5,xtstep=10,title="Full sequences ")
seqtab(data.seq,weighted=FALSE, tlim = 1:10)