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=15,
col="#00CACA",
xlab="statistic",
ylab="Math",
main="班級的成績")

hist(statistic,
col= "blue",
main ="班上的成績",
xlab ="成績",
ylab ="次數")

# Load ggplot2
library(ggplot2)
# Create data
data <- data.frame(
社團種類=c("娛樂休閒","知識閱讀","體育競技","科學創新","公益活動") ,
次數=c(185,82,32,28,25)
)
# Barplot
ggplot(data, aes(x=社團種類, y=次數)) +
geom_bar(stat = "identity") +
coord_flip()

次數<- c(185,82,32,28,25)
labels <- c("娛樂休閒","知識閱讀","體育競技","科學創新","公益活動")
pie(次數,labels,main ="學生的比例", col=cm.colors(length(次數)))

Data <- read.csv("C:/table1_1.csv")
print(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
summary(Data$Japanese)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 49.00 54.50 62.00 67.90 82.75 91.00
stem(Data$Japanese)
##
## The decimal point is 1 digit(s) to the right of the |
##
## 4 | 9
## 5 | 139
## 6 | 13
## 7 | 9
## 8 | 49
## 9 | 1