In R we can go for library(car) and then apply Levene's Test by using the following formula:
leveneTest(age~sex): in this e.g. sex is a categorical variable having male and female as two groups. This formula will test the null hypothesis that the variances of age in male and female groups are equal. If p is less than 0.05 then it means that the null hypothesis is rejected i.e. the variances are not equal in the two groups.