plot.zipath=function(x, xvar=c("norm","lambda"),type=c("count", "zero"), label=FALSE,...){
xvar=match.arg(xvar)
type=match.arg(type)
if(type=="count"){
b <- x$coefficients$count[-1,]
df <- apply(abs(b)>0, 2, sum)
#plotCoef(b,lambda=x$lambda.count,df=df,label=label,xvar=xvar,...)
eval(parse(text="glmnet:::plotCoef(b,lambda=x$lambda.count,df=df,label=label,xvar=xvar,...)"))
} else{
b <- x$coefficients$zero[-1,]
df <- apply(abs(b)>0, 2, sum)
#plotCoef(b,lambda=x$lambda.zero,df=df,label=label,xvar=xvar,...)
eval(parse(text="glmnet:::plotCoef(b,lambda=x$lambda.zero,df=df,label=label,xvar=xvar,...)"))
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.