passing objects to return results in an error
I expected the following code to return the lower and upper bounds of a 95% confidence interval:
confint95 = function(mean, se) { confint = abs(se*1.96) lower = abs(mean-cint) upper = abs(mean+cint) return(lower,upper) }
But this gives this message:
Error in return(lower, upper) : multi-argument returns are not permitted
How can I set function to return the lower and upper bounds of a 95% confidence interval?
