How to plot a contour plot with heat map in R using output from data function

This question relates to the data function posted on the exchange:

I've got it working well in Spotfire. However, I have an associated application where I need to plot the heatmap in R and save the image to a file.  I realize this is an unusual question, but I'm hoping someone can help me.  I've never plotted WKB objects in R.  I have the x,y,z data and the Contours, MajorContours and heatmap data.frames (all  have Level, and Geometry columns) in my R session, but am stuck on how to reproduce the map that I'm able to plot in Spotfire.  Any help is appreciated!

#Spotfire #data function #heat map #R