The function bartlett.test performs a test of the null that the variances in each of the groups (samples) are the same.
The function is provided with a formula of the form con~trt where 'con' gives the data (response variable) and 'trt' the corresponding groups (explanatory variable).