compare with package caTools