make.ASCA.design <- function(x)
{
x<-as.factor(x)
levels<-unique(x)
n<-length(x)
p<-length(levels)
Design<-matrix(0,nrow=n,ncol=p)
for (i in 1:n){
for (j in 1:p){
if (x[i]==levels[j])
{
Design[i,j]=1
}
}
}
colnames(Design)<-levels
output<-Design
output
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.