utils::globalVariables(c("FLXSA.control","FLXSA"))
xsaTest<-function(om,pg=10,ctrl=FLXSA.control()){
stk=setPlusGroup(om,pg)
idx=FLIndex(index=stock.n(stk))
range(idx)[c("plusgroup","startf","endf")]=c(pg,0.01,.1)
stk+FLXSA(stk,idx,control=ctrl,diag.flag=FALSE)}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.