Hi, I am trying to the run code on RStudio Version 1.1.463, R version 3.5.3; form the study book about R (2014), and I get an error:
Error: unexpected symbol in:
"for (i in 1:Nboot) { boots[i] <- mean(sample(data, replace = T))}
CI <- quantile(boots, probs = c(0.025, 0.975)) return"
> boot_np <- function(data , Nboot=5000) { boots <- numeric(Nboot)
+ for (i in 1:Nboot) { boots[i] <- mean(sample(data, replace = T))}
+ CI <- quantile(boots, probs = c(0.025, 0.975)) return(c(m = mean(data), CI))}
Thank you.