Document Model for Non-Linear Dynamic Documents (in R)