1
library(readxl)
mlu_data<- read_excel("/Users/andahui/Desktop/mlu.xls",sheet = 2)
mlu_data->copy_mlu_data
2
unique(copy_mlu_data$age)
## [1] "A0" "A1" "A2"
3
library(dplyr)
##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
copy_mlu_data<- rename(copy_mlu_data, utterances = utterances_mlu )
copy_mlu_data<- rename(copy_mlu_data, words = words_mlu)
4
copy_mlu_data$mlu<- copy_mlu_data$words/copy_mlu_data$utterances
5
summary(copy_mlu_data$mlu)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.730 2.447 2.745 2.696 2.916 3.476
6
copy_mlu_data$grade <- ifelse(copy_mlu_data$mlu >= 2.916,"A", ifelse(copy_mlu_data$mlu >= 2.745, "B", ifelse(copy_mlu_data$mlu >= 2.447,"C", "D")))
8
library(ggplot2)
qplot(copy_mlu_data$age,copy_mlu_data$mlu)
## Warning: `qplot()` was deprecated in ggplot2 3.4.0.
## This warning is displayed once every 8 hours.
## Call `lifecycle::last_lifecycle_warnings()` to see where this warning was
## generated.