I am relatively new to R, so I am just trying to see what I am missing. I have a few questions about the process of doing this correctly.
My sample space is {2,4,9,12}. I need to verify that the mean of this sample is 6.75, which it is if I input
s <- c(2,4,9,12)
mean(s)
I also need to calculate the variance of s, but when I calculate the variance
var(s) = 20.91667. The book I am reading, Statistical Inference, Casella & Berger, shows that the variance is 3.94. Now, I know since I am bootstrapping there is a different method, where instead of the sample variance being divided by (n-1), it is divided by ((n^n)-1) and it needs to be summed from i = 1 all they way up to (n^n). For easier understanding, screenshot of this formula will be posted here:

Question 1
Is there a function implemented within R that finds the bootstrap mean and variance that can help me verify this answer? If so, can an example be provided on how to do so?
Question 2
For my own curiosity. Let's say that I wanted to bootstrap that sample space (not sure if that makes too much sense). How do I find the bootstrap mean and variance of a sample WITH replacement and loop that over for 10,000 samples?
Bear with me on this, because like I had mentioned, I am new to R and this concept of bootstrapping. Please correct me if my thought process is not exactly right. So, for example, when I input sample(c(2,4,9,12), replace = T, 10000), it gives me 10,000 elements, but I want 10,000 vectors of length of 4. In other words, when I input sample(c(2,4,9,12), replace = T, 1), it only gives one value, but I would like it to be a vector of 4 with any order of those four values WITH replacement. Now, once all 10,000 vectors (assuming that it is not the SAME vector repeated are created, I want to be able to find the bootstrap mean and variance of each vector. Once I have these means and variances, I want to be able to create a distribution graph to observe the CLT visually.
I am aware that my conceptual understanding of bootstrapping may be flawed, so please, I urge you to give me pointers to solidify my understanding.
Thank you ahead of time.