Create a cartogram on a SpatialPolygonsDataFrame object

I'm trying to create a cartogram using a SpPDF object as the base, and to produce an object of the same type. I've got a question over on SO that has a bit more background: http://stackoverflow.com/questions/18419617/use-rcartogram-on-a-spatialpolygonsdataframe-object. does this approach seem sensible or possible?