revised function to allow for missing variable and numeric data.  provided more detail to readme.