Formatting data to run in MARK or RMark