-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHeader_TT.R
executable file
·106 lines (75 loc) · 2.02 KB
/
Header_TT.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
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
#!/usr/bin/Rscript
#if (!require(tidyverse)){
#install.packages("tidyverse")
#}
#install.packages("tidyverse")
library(tidyverse)
#install.packages("plyr")
library(plyr)
#install.packages("psych")
library(psych)
#install.packages("Hmisc")
library(Hmisc)
#install.packages("rstatix")
library(rstatix)
#install.packages("GGally")
library(GGally)
#install.packages("ggpubr")
library(ggpubr)
#install.packages("standardize")
library(standardize)
#install.packages("quantable")
library(quantable)
#install.packages("DescTools")
library(DescTools)
#install.packages("scales")
library(scales)
#install.packages("arsenal")
library(arsenal)
#install.packages("ggcorrplot")
library(ggcorrplot)
library("RColorBrewer")
library(gplots)
#install.packages("png")
library(png)
library(corrplot)
library(corrgram)
library(ggrepel)
#install.packages("ggbeeswarm")
library(ggbeeswarm)
#install.packages("ggridges")
library(ggridges)
#install.packages("summarytools")
#library(summarytools)
#install.packages("groupedstats")
library(groupedstats)
#install.packages("moments")
library(moments)
#install.packages("prob")
library(prob) # python type isin function
#install.packages("cobalt")
#library(cobalt) # var.names
library(magrittr)
library(qwraps2)
#options(qwraps2_markup = "markdown")
#if (!requireNamespace("BiocManager", quietly = TRUE))
# install.packages("BiocManager")
#BiocManager::install("ComplexHeatmap")
#library(ComplexHeatmap)
########################################################################
# My functions
########################################################################
my_kurtosis <- function(x) {
m4 <- mean((x - mean(x))^4)
kurtosis <- m4/(sd(x)^4) - 3
kurtosis
}
my_skewness <- function(x) {
m3 <- mean((x - mean(x))^3)
skewness <- m3/(sd(x)^3)
skewness
}
########################################################################
# My local imports
########################################################################
source("legend_adjustment.R")