Learn R Programming

mechkar (version 1.14.6)

MeanCI: Calculates the mean and 95% confidence interval of a numeric vector

Description

This function return a vector containing the mean and 95% confidence interval of a numeric vector.

Usage

MeanCI(x,round=3)

Arguments

x

a numeric vector

round

the number of decimals to be returned. Default is 3

Value

This function returns a named numeric vector with the mean and the lower and upper confidence interval.

Examples

Run this code
# NOT RUN {
### calculates the mean and 95% CI of a given vector
x <- c(1,0,1,0,0,0,1,1,0)
mn <- MeanCI(x)
# }

Run the code above in your browser using DataLab