### dontrun is used here to avoid the creation of a new file### in the CRAN servers. The example should work fine:## Not run:data(iris)M=fit(Species~.,iris,model="rpart")tempdirpath=tempdir()filename=paste(tempdirpath,"/iris.model",sep="")savemodel(M,filename)# saves to fileM=NULL# cleans MM=loadmodel(filename)# load from fileprint(M)## End(Not run)