Added an unvec function to undo the vec operator
First commit for R regression module, untested