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="yellow",
xlab="統計成績",
ylab="數學成績",
main="統計成績、數學成績")

Math <- c( 85,91,74,100,82,84,78,100,51,70)
hist(Math,
col= "lightblue",
main ="數學成績",
xlab ="成績",
ylab ="次數")

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

data=c(25,28,36,82,185)
labels=c("1","2","3","4","5")
pie(data,labels,main ="大學生最喜歡參加社團比例",
col=terrain.colors(length(data)))

Data<- c( 84,63,61,49,89,51,59,53,79,91)
stem(Data)
##
## The decimal point is 1 digit(s) to the right of the |
##
## 4 | 9
## 5 | 139
## 6 | 13
## 7 | 9
## 8 | 49
## 9 | 1
Data<- c( 84,63,61,49,89,51,59,53,79,91)
mean(Data)
## [1] 67.9
## [1] 62
as.numeric(names(table(Data)))[which.max(table(Data))]
## [1] 49
## [1] 16.25115
## [1] 264.1
Q1 <- quantile(Data, 1 / 4)
Q3 <- quantile(Data, 3 / 4)
Q1
## 25%
## 54.5
## 75%
## 82.75