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
head(data$Math)
## [1]  85  91  74 100  82  84
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(data$Math)
## 
##   The decimal point is 1 digit(s) to the right of the |
## 
##    5 | 1
##    6 | 
##    7 | 048
##    8 | 245
##    9 | 1
##   10 | 00
plot(data$Statistic,
     pch=17,
     col="orange",
     xlab="Name",
     ylab="Statistic",
     main="統計成績之散佈圖")

plot(data$Math,
     pch=17,
     col="orange",
     xlab="Name",
     ylab="Math",
     main="數學成績之散佈圖")

hist(data$Math,
     col= "lightyellow",
     main="數學成績的直方圖" ,
     xlab ="Math",
     ylab ="次數")

# Load ggplot2
library(ggplot2)
# 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,  fill="skyblue") 

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

pie(data,labels,main ="大學生最喜歡的社團次數", col=heat.colors(length(data)))

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

stem(Deutsch)
## 
##   The decimal point is 1 digit(s) to the right of the |
## 
##   4 | 9
##   5 | 139
##   6 | 13
##   7 | 9
##   8 | 49
##   9 | 1
Deutsch<-c(84,63,61,49,89,51,59,53,79,91)

mean(Deutsch)
## [1] 67.9
median(Deutsch)
## [1] 62
as.numeric(names(table(Deutsch)))[which.max(table(Deutsch))] 
## [1] 49
sd(Deutsch)
## [1] 16.25115
var(Deutsch)
## [1] 264.1
Q1 <- quantile(Deutsch,1/4) 
print(Q1)
##  25% 
## 54.5
Q3 <- quantile(Deutsch,3/4) 
print(Q3)
##   75% 
## 82.75