jj <- c(rep("oak",5) ,rep("ash",2),rep("elm",3),"pine","tea","yew")
a <- as.count(jj)
phi(a)
unphi(phi(a)) #should match 'a' except for species names (which are lost)
data(butterflies)
phi(butterflies,add=FALSE)
summary(unphi(phi(butterflies))) #should match 'summary(butterflies)'
Run the code above in your browser using DataLab