Recently Published
balloonplot
housetasks_tab = as.table(as.matrix(housetasks))
balloonplot(t(housetasks_tab) ,xlab = "" , ylab = "" ,
show.margins =F , label = F , main = "House Tasks" )
BoxPlot
ggboxplot(data = ToothGrowth , x = "dose" ,y = "len" ,
color = "supp" ,palette =c( "#E69F00", "#56B4E9" ,"#CC79A7") ,
title = "ToothGrowth" ,xlab = "Dose" ,
ylab ="Tooth Length" )
Plot
PlantGrowth
PlantGrowth%>%
group_by(group)%>%
summarise(
count = n() ,
mean(weight) ,
sd(weight)
)
palette.colors()
ggboxplot(data = PlantGrowth , x = "group" ,y = "weight" ,
color = "group" ,palette =c( "#E69F00", "#56B4E9" ,"#CC79A7") ,
title = "Treatment Impact" ,xlab = "Group" ,
ylab ="Weight" )
with(PlantGrowth ,shapiro.test(weight[group == "ctrl"]) )
with(PlantGrowth ,shapiro.test(weight[group == "trt1"]) )
with(PlantGrowth ,shapiro.test(weight[group == "trt2"]) )
plant_avo = aov(weight~group , data = PlantGrowth)
summary(plant_avo)
TukeyHSD(plant_avo)
Y = plot(plant_avo , 2)
ANOVA_test
PlantGrowth
PlantGrowth%>%
group_by(group)%>%
summarise(
count = n() ,
mean(weight) ,
sd(weight)
)
palette.colors()
ggboxplot(data = PlantGrowth , x = "group" ,y = "weight" ,
color = "group" ,palette =c( "#E69F00", "#56B4E9" ,"#CC79A7") ,
title = "Treatment Impact" ,xlab = "Group" ,
ylab ="Weight" )
with(PlantGrowth ,shapiro.test(weight[group == "ctrl"]) )
with(PlantGrowth ,shapiro.test(weight[group == "trt1"]) )
with(PlantGrowth ,shapiro.test(weight[group == "trt2"]) )
plant_avo = aov(weight~group , data = PlantGrowth)
summary(plant_avo)
TukeyHSD(plant_avo)
X = plot(plant_avo , 1)
paired_data
pr = paired(Before , After)
plot(pr , type = "profile") + theme_light()
Hypothsis_t.test
women_weight <- c(38.9, 61.2, 73.3, 21.8, 63.4, 64.6, 48.4, 48.8, 48.5)
men_weight <- c(67.8, 60, 63.4, 76, 89.4, 73.3, 67.3, 61.3, 62.4)
gender_weight = data.frame(
gender =rep(c("men", "women") , each = 9) ,
weight = c(men_weight , women_weight)
)
gender_weight%>%
group_by(gender)%>%
summarise(
count = n() ,
mean(weight) ,
sd(weight)
)
ggboxplot(data = gender_weight , x = "gender" ,y = "weight" ,
color = "gender" ,palette =c( "#E69F00", "#56B4E9") ,
title = "Is weight differance" ,xlab = "Gender" ,
ylab ="weight" )
with(gender_weight ,shapiro.test(weight[gender == "men"]) )
with(gender_weight ,shapiro.test(weight[gender == "women"]) )
t.test(weight ~ gender , data = gender_weight , var.equal = T )
Heatmap
H.H. = read.table("bionform/GSE46224_Yang_et_al_human_heart_RNASeq.txt/GSE46224_Yang_et_al_human_heart_RNASeq.txt")
colnames(H.H.) = H.H.[1,]
rownames(H.H.) = H.H.[ , 1]
Human_H = H.H.[-1,-1]
class(Human_H)
# PREPARATION Human_H
Human_Hr =as.matrix(Human_H)
is.matrix(Human_Hr)
Human_Hrt = apply(X = Human_Hr, MARGIN = 1 , FUN = var)
# SELECT THE MOST 100 VARIANCE GENE
Human_gene = names(Human_Hrt[order(Human_Hrt , decreasing = T)][1:100])
human_heart = Human_H[Human_gene , ]
human_heart_fl = apply(human_heart , 2 ,FUN = as.numeric)
pheatmap(mat = human_heart_fl , scale = "row" , cluster_rows = T ,
cluster_cols = T , cutree_cols = 5 , show_rownames = T ,
show_colnames = T, main = "Human_Heart data")
str(human_heart_fl)
scatterplot
ggplot(data = mpg , mapping = aes(x= drv,y = hwy,color = displ < 5))+
geom_point()+
facet_wrap(~ class)+
theme_light()+
ggtitle("mpg Data")+
xlab("he type of drive train")+
ylab("highway miles per gallon")
Box Plot & Violin Plot
ggplot(data = mpg , mapping = aes(x = drv , y = displ ))+
geom_violin( fill = "green" )+
geom_boxplot(width = 0.2, fill = "red")+
facet_grid(~ class)+
theme_light()+
ggtitle("mpg data")+
xlab("The type of drive train")+
ylab("Engine displacement, in litres")
Scaterplot
ggplot(data = diamonds, mapping = aes(x= price,y= carat , color = cut ))+
geom_point()+
theme_light()+
facet_wrap(~cut)+
xlab("Diamonds Price")+
ylab("Diamond Carat") +
ggtitle("Scatterplot")
Scatterplot
ggplot(data = economics, mapping = aes(x= pop,y= psavert , color = uempmed ))+
geom_point()+
theme_light()+
xlab("Population")+
ylab("Save_money") +
ggtitle("Negative_linear correlation")