Cheat sheet for using R X=c(1,2,3,4,2,5) # assigns the set…

Cheat sheet for using R X=c(1,2,3,4,2,5) # assigns the set of data to the variable X sum(X) #calculates the sum of all data contained in X mean(X)# calculates the average of data contained in X table(X) #counts the number of time a value occurs in X cumsum(X) # calculates the cumulative sum and can be used to calculate cumulative freq X=sum(X)/length(X) # is an expression that calculates the mean Y= X-1 # subtracts 1 from each data point in X Z=seq(1,1000,by=2) # generates a sequence of numbers from 1 to 1000 by 2 (1, 3, 5…) When calculating variance and standard deviation I need to see the long form of the calculation in R Given the following values of X, calculate the sample variance, sample standard deviation and z-score for the data set. Solve the problem without using the R function SD and show all the steps using R.  I only need the R code. There is not need to do the arithmetic.  Write the mathematical formula for standard deviation and z-score calculation.   #calculate the sample variance, sample standard deviation and z-scorex