I use set.seed=(7)
and find a random sample of size 4 from the standard normal distribution with replicate(n=100, rnorm(4))
Now I have data 4 rows and 100 column.
How can I use the replicate function to run the mean of each column (100 column here)?
Also, how I can I use replicate function to run the following formula?
(1/(n-1)(sum((x-mean(x))^2))