Changed the process of throwing errors to R from Rcpp::exception to ::Rf_error
Also checked the type of the arguments in the api
Improved error checking for NA and eliminated the n (number of rows) from the API
added a set of defines for the type constant strings