Adding additional functionality to outputSGP to handle data.frames