Let’s start with calculating mean, SD and CV for glucose IQC Level 1

# Some arbitrary glucose IQC results --> Level 1

glucose_L1 <- c(101, 111, 103, 98, 100, 106, 103, 94, 90, 102, 98, 100, 97, 107, 98, 106, 107, 87, 100, 107)

# We are creating variable named "glucose_mean_L1" and assigning calculated mean to this variable
glucose_L1_mean <- mean(glucose_L1)

#print Mean
glucose_L1_mean
## [1] 100.75
# We are creating variable named "glucos_sd_L1" and assigning calculated SD  to this variable
glucos_L1_sd <- sd(glucose_L1)
#print SD
glucos_L1_sd
## [1] 5.972525
#Now Calculate CV = sd/mean*100

glucose_L1_CV <- (glucos_L1_sd / glucose_L1_mean) * 100 

Glucose mean is 100.75 mg/dL.
SD is 5.9725248 mg/dL and
CV is 5.9280643 .