Bin data, calculate mean and bootstrap 95% confidence interval in the meanSource:
Bin a variable and calculate mean an uncertainties in mean
Name of the data frame to process.
The name of the column to divide into intervals
The name of the column for which the mean, lower and upper uncertainties should be calculated for each interval of
The number of intervals to split
The interval to be used for binning the data.
User specified breaks to use for binning.
Retruns a summarised data frame with new columns for the mean and upper / lower 95% confidence intervals in the mean.
This function summarises data by intervals and calculates the mean and bootstrap 95% confidence intervals in the mean of a chosen variable in a data frame. Any other numeric variables are summarised by their mean intervals.
There are three options for binning. The default is to bon
bin into 40
intervals. Second, the user can choose an binning interval e.g.
interval = 5. Third, the user can supply their own breaks to use as