salary <- c(21, 19, 27, 11, 102, 25, 21)
Gini(salary)
new.1000 <- sample((median(salary) - IQR(salary)) :
(median(salary) + IQR(salary)), 1000, replace=TRUE)
salary2 <- c(salary, new.1000)
Gini(salary2)
salary3 <- salary[-which.max(salary)]
salary3
Gini(salary3)
salary4 <- c(salary3, 1010)
salary4
Gini(salary4)
Run the code above in your browser using DataLab