Closed Himalayayadav444 closed 6 years ago
X <- runif(100,0,100) #Generate Random numbers DSMean = 0 for (i in 1:NROW(X)) #NROW() gives the lenght of dataset { DSMean <- DSMean + X[i] } DSMean = DSMean/NROW(X) DSMean mean(X)
X <- runif(100,0,100) #Generate Random numbers DSMean = 0 for (i in 1:NROW(X)) #NROW() gives the lenght of dataset { DSMean <- DSMean + X[i] } DSMean = DSMean/NROW(X) DSMean mean(X)