Statistic <- c(68,85,74,88,63,78,90,80,58,63)
Math <- c(85,91,74,100,82,84,78,100,51,70)
plot(Statistic, Math,
pch = 19,
col = "blue")

hist(Statistic,
freq = TRUE,
col="green",
main = "班上的統計成績",
xlab = "統計成績",
ylab = "次數")

library(ggplot2)
data <- data.frame(
社團類型=c("娛樂休閒","知識閱讀","體育競技","科學創新","公益活動") ,
次數=c(185,82,36,28,25)
)
ggplot(data, aes(x=社團類型, y=次數)) +
geom_bar(stat = "identity", width=0.2,
fill="purple")

Prop <- c(185,82,36,28,25)
pie(Prop , labels = c("娛樂休閒","知識閱讀","體育競技","科學創新","公益活動")
)

data <- data.frame(
x=c("娛樂休閒","知識閱讀","體育競技","科學創新","公益活動"),
y=c(185,82,36,28,25))
ggplot(data, aes(x=x, y=y)) +
geom_segment( aes(x=x, xend=x, y=0, yend=y), color="blue") +
geom_point( size=5, color="blue", fill=alpha("green", 0.3), alpha=0.7, shape=21, stroke=2)+
xlab("社團類型")+
ylab("人數")

library(readxl)
library(readr)
Data <- read.csv("C:/Users/user/Desktop/table1_1.csv")
Data
## Name Statistic Math Japanese Management Accounting
## 1 張青松 68 85 84 89 86
## 2 王奕翔 85 91 63 76 66
## 3 田新雨 74 74 61 80 69
## 4 徐麗娜 88 100 49 71 66
## 5 張志傑 63 82 89 78 80
## 6 趙穎睿 78 84 51 60 60
## 7 王智強 90 78 59 72 66
## 8 宋媛婷 80 100 53 73 70
## 9 袁四方 58 51 79 91 85
## 10 張建國 63 70 91 85 82
summary(Data)
## Name Statistic Math Japanese
## Length:10 Min. :58.00 Min. : 51.0 Min. :49.00
## Class :character 1st Qu.:64.25 1st Qu.: 75.0 1st Qu.:54.50
## Mode :character Median :76.00 Median : 83.0 Median :62.00
## Mean :74.70 Mean : 81.5 Mean :67.90
## 3rd Qu.:83.75 3rd Qu.: 89.5 3rd Qu.:82.75
## Max. :90.00 Max. :100.0 Max. :91.00
## Management Accounting
## Min. :60.00 Min. :60.0
## 1st Qu.:72.25 1st Qu.:66.0
## Median :77.00 Median :69.5
## Mean :77.50 Mean :73.0
## 3rd Qu.:83.75 3rd Qu.:81.5
## Max. :91.00 Max. :86.0