I am trying to find the column mean and std for my new data set results from my bootstrap, I was trying to use mean(results$V1) but it isnt working as its a vector. Not too sure where to go from here but hopefully the fix isnt hard. The Bootstrap had no issues and ran fine, it created the new data set results and I just need to find the mean and std for those individual columns
nBoot = 1000
> results = array(NA, dim = c(nBoot, length(unique(DATAWAR$Name))))
> J = 1
> for (name in unique(DATAWAR$Name)) {
+ tempdata = DATAWAR[DATAWAR$Name == name,"CustomWAR"]
+ n = length(tempdata)
+ for(i in 1:nBoot){
+ dat = sample(tempdata, n, replace = T)
+ results[i, J]= sum(dat)
+ }
+ J = J+1
+ }
> mean(results$V1)
Error in results$V1 : $ operator is invalid for atomic vectors