Skip to content

Instantly share code, notes, and snippets.

@ggrothendieck
ggrothendieck / leftShift.cpp
Last active May 5, 2019 17:26
Illustrates that a NumericVector is a pointer
/**
* @title A NumericVector is Really a Pointer
* @author G. Grothendieck completing Michael Meyer's post at https://stat.ethz.ch/pipermail/r-help/2015-August/431645.html
* @license GPL (>= 2)
* @tags NumericVector pointer
* @summary Shows that a NumericVector is a pointer.
*/
// To run: library(Rcpp); sourceCpp("leftShift.cpp")