indicator<-function(condition, x){ sapply(1:length(condition),function(i) ifelse(condition[i]==1,x[i],0)) }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.