# Sample data
SERIAL_NO<- c(1:12)
SW<- c(20,10,40,50,13,25,23,26,14,10,07,05)
x <- c(840,204,944,1009,745,811,883,593,254,215,172,169)
y <- c(150,104,293,331,113,52,164,201,124,108,95,90)
z <- c(350,214,693,731,413,352,364,301,214,208,186,130)
# View the sample data
data<-cbind(SERIAL_NO, SW, x, y, z)
# Calculate composite indices using the sample data
PcIndex(data)
Run the code above in your browser using DataLab