// [[Rcpp::export]] XPtr<Attribute> OpenAttribute_DataSet(XPtr<DataSet> loc, string attributename) { try { Attribute attr = loc->openAttribute(attributename); return XPtr<Attribute>(new Attribute(attr)); } catch (Exception& error) { throw Rcpp::exception("Opening Attribute failed."); } }