factored out the R-format code for standard and intersection problem forms. this will break a lot of stuff until we update the other modules