R package for working with composite graphs