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)

plot(Statistic,Math,
     pch=16,
     col="#9AE0D8",
     xlab="統計",
     ylab="數學",
     main="班上的統計成績與數學成績")

hist(Statistic,
     col= "purple",
     main ="班上的統計成績與數學成績",
     xlab ="統計",
     ylab ="次數")

# Load ggplot2
library(ggplot2)

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

# Barplot
ggplot(data, aes(x=社團類型, y=次數)) + 
  geom_bar(stat = "identity", width=0.2) 

data2<- c(52,23,10,8,7)
labels <- c("娛樂休閒","知識閱讀","體育競技","科學創新","公益活動")

pie(data2,labels,main ="社團的比例", col=heat.colors(length(data)))

library(readxl)

Japanese <- c(84,63,61,49,89,51,59,53,79,91)

Data <- read.csv("D:/2.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
stem(Japanese,scale = 2)
## 
##   The decimal point is 1 digit(s) to the right of the |
## 
##   4 | 9
##   5 | 13
##   5 | 9
##   6 | 13
##   6 | 
##   7 | 
##   7 | 9
##   8 | 4
##   8 | 9
##   9 | 1