library(tidyverse)
library(ggdag)
library(ggraph)
theory_dag <- dagify(AE ~ PF,
PF ~ IC + RC,
FIC ~ AE,
labels = c("AE" = "Advocacy\neffects",
"PF" = "Programmatic\nflexibility",
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// the column-wise implementation is just as fast as colMeans, | |
// but the row-wise operation is not quite as fast as rowMeans. | |
// can I do better? | |
#include <Rcpp.h> | |
using namespace Rcpp; | |
template <class T> | |
inline double do_mean( T& x ) { |