startsWith <- c(68,85,74,88,63,78,80,90,84)
  MATH <- c(5,91,74,100,82,78,100,51,70)

plot(startsWith,MATH,
     pch = 17,
     col= "skyblue",
     main ="班上的體重與身高",
     xlab ="體重",
     ylab ="身高")

data <- c(50,23,35,48)
labels <- c("英文系","法文系","德文","翻譯")

pie(data,labels,main ="學生的比例", col=heat.colors(length(data)))

hist(startsWith,
     col= "lightyellow",
     main="統計成績的直方圖",
     xlab ="體重",
     ylab ="次數")

# Load ggplot2
library(ggplot2)

# Create data
data <- data.frame(
  name=c("娛樂休閒","知識閱讀","體育競技","科學創新","公益活動") ,  
  value=c(185,82,36,28,25)
  )

# Barplot
ggplot(data, aes(x=name, y=value)) + 
  geom_bar(stat = "identity")

Data <- read.csv("D:/1.csv")

head(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
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
mean(Data$Japanese)    #平均數
## [1] 67.9
median(Data$Japanese)  #中位數
## [1] 62
as.numeric(names(table(Data$Japanese)))[which.max(table(Data$Japanese))]  #眾數
## [1] 49
sd(Data$Japanese)  #標準差
## [1] 16.25115
var(Data$Japanese) #變異數
## [1] 264.1
Q1 <- quantile(Data$Japanese, 1 / 4) 
Q1
##  25% 
## 54.5
Q3 <- quantile(Data$Japanese, 3 / 4)