It was the vector that threw me off. Seems like my issue was that I imported the data into a data frame and not a vector. Once I converted, using resample and mean worked. Thank you!No, it's not. You're generating a new set of samples.
This snippet basically does the bootstrap (unless sample here doesn't work either), still not sure what's wrong with your original code.
Code:resample <- vector(mode="numeric", length=n) for (i in 1:n) { t <- sample(1:n, 1) resample[i]=x[t] }