Help! how to compute this on R Studio?

Hi everyone, I'm a rookie on R Studio, someone can help me to know how to compute this on R?

Thanks.


do_a_thing <- function(x){
  
  part <- 1.96 *sqrt(var(x))
  
  list(plus_parts = x + part,
      minus_parts = x - part)
}


do_a_thing(1:5)
1 Like