Here is a simple function in R to convert a dataframe for a copy/paste
in MLcomp.
toMLCOMP <- function (X,Cl,file="") {
for (i in seq_len(nrow(X))) {
x <- X[i,]
ix <- which(!
is.na(x))
ixx <- mapply(function(x,y) paste(x,y,sep=":"),ix,x[ix]);
cat(Cl[i]," ",ixx,"\n",file);
}
}
Example :
toMLCOMP(iris[,1:4],iris[,5])
I know it could be improved but i hope you will enjoy it ;)
Christophe.