exploit <- c(10,55,24,55,20,43,52,96)
vanguard <- c(1,1,2,3,2,3,1,8)
mean(exploit)
## [1] 44.375
median(exploit)
## [1] 47.5
Q1 <- quantile(exploit, 1 / 4)
Q1
## 25%
## 23
Q2 <- quantile(exploit, 2 / 4)
Q2
## 50%
## 47.5
Q3 <- quantile(exploit, 3 / 4)
Q3
## 75%
## 55
plot(exploit,vanguard,
pch=20,
col="orange",
xlab="exploit",
ylab="vanguard",
main="exploit and vanguard")

hist(exploit,
col= "yellow",
main ="old and rank",
xlab ="old",
ylab ="rank")

library(ggplot2)
# create dummy data
data <- data.frame(
name=letters[1:5],
value=sample(seq(45,16),5),
sd=c(19,26,32,28,42)
)
# Most basic error bar
ggplot(data) +
geom_bar( aes(x=name, y=value), stat="identity", fill="skyblue", alpha=0.7) +
geom_errorbar( aes(x=name, ymin=value-sd, ymax=value+sd), width=0.4, colour="orange", alpha=0.9, size=1.3)
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.

data<- c(20,50,64,74,50)
labels <- c("飛信隊","王騎","王翦","李牧","廉頗")
pie(data,labels,main ="特勳", col=heat.colors(length(data)))
