Hidden (or invisible or transparent) notes can be useful in preparing theory or composition exercises.
c4 d4 \hideNotes e4 f4 \unHideNotes g4 a
Hidden notes are also great for performing weird tricks. For example, slurs cannot be attached to rests or spacer rests, but you may wish to include that in your score – string instruments use this notation when doing pizzicato to indicate that the note should ring for as long as possible.
\clef bass << { c4^"pizz"( \hideNotes c) \unHideNotes c( \hideNotes c) } { s4 r s r } >>
This page is for LilyPond-2.6.3 (stable-branch).