Skip to content

Instantly share code, notes, and snippets.

@Planeshifter
Last active December 18, 2015 21:28
Show Gist options
  • Save Planeshifter/5847130 to your computer and use it in GitHub Desktop.
Save Planeshifter/5847130 to your computer and use it in GitHub Desktop.
Print the length of a std::vector of strings.
#include <Rcpp.h>
#include <string>
#include <vector>
// [[Rcpp::export]]
void print_vector(vector<std::string> input)
{
for( std::vector<string>::iterator i = input.begin(); i != input.end(); ++i)
Rcout << *i << ' ';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment