Effects of disorder on atomic density waves and spin-singlet dimers in one-dimensional optical lattices