Statistical study of warps in a sample of spiral and lenticular galaxies