-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathptII_quan_EDA_case_Chiro_heartrate-variability_helpfuncs.r
51 lines (43 loc) · 1.46 KB
/
ptII_quan_EDA_case_Chiro_heartrate-variability_helpfuncs.r
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
### (C) 2005-2023 by Leo Guertler
### R-code supplement
### to the book
###
### "Subjektive Ansichten und objektive Betrachtungen"
###
### written by Gürtler & Huber (2023)
###
### All R-code is published under the GPL v3 license:
###
### https://www.gnu.org/licenses/gpl-3.0.en.html
###
### except for 'borrowed' code - see links and references.
### For this R-code the original license of the respective
### authors is valid.
###
### R-code published on
###
### https://osdn.net/projects/mixedmethod-rcode
### https://github.com/abcnorio/mixedmethod-rcode
# file:
# ptII_quan_EDA_case_Chiro_heartrate-variability_helpfuncs.r
# location:
# chap. 5 [5.5.6]
# Ein Experiment zur Herzratenvariabilität
# HELPER FUNCTIONS
###### function to plot interactions
ia.plot <- function(dframe=NA, facs=NA, f1nam=NA, f2nam=NA, vars=NA,
TITLE="", SUB="", colo=c("violetred3","blue","yellowgreen","orange"), ylab="mean",
trace.label="xxx", ...)
{
par(mar=c(5,5,4,2), oma=c(2,1,5,1), cex.axis=0.8, mfrow=c(2,2))
for(i in vars)
{
interaction.plot(facs[,f1nam], facs[,f2nam], dframe[,i], pch=21, cex=1.5, bg=colo, type="b", xtick=TRUE,
trace.label=trace.label, bty="n", main=i, col=colo, ylab=ylab, xlab=f1nam)
}
mtext(TITLE, 3, line=2, cex=1.5, outer=TRUE)
mtext(SUB, 3, line=.35, cex=1.1, outer=TRUE)
}
# call:
# ia.plot(dframe=daten.analy, f1=timepoint, f2=sex, vars=vars, TITLE=TITLE, SUB=SUB, colo=colo)
########################## END OF FUNCTION