collapse<-function(vect){
oldClass<-class(vect)
factorized<-factor(vect)
newFactor<-factor(.Call(Cpp_icosa_Collapse_, factorized))
levels(newFactor)<-levels(factorized)
newVect<-as.character(newFactor)
class(newVect) <- oldClass
return(newVect)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.