[Rcpp-devel] Enquire on Rcpp::wrap or equivilant

Tama Ma pingnang at phys.ethz.ch
Sun Dec 5 20:09:10 CET 2010

Dear Rcpp developers,

	May I kindly enquire on the wrapping of a portion of a container into an R numeric array by Rcpp::wrap?

	For example, I wish to have:

template <class size_type, class element_type>
		(	element_type*	obj
		,	size_type*		n
	Rcpp::NumericVector	Rvec;
	std::copy( *obj , *(obj+n),  std::back_inserter(Rvec));

	return Rvec;	

	May I know how I can do this?

	Thank you very much.

Best regards,
Tama Ma

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/rcpp-devel/attachments/20101205/f2233c85/attachment.htm>

More information about the Rcpp-devel mailing list