I'm using rpart library in R. In a function, I want to return an array of rpart objects which are generated in a for loop. However, I don't know which data structure I should use for storing rpart objects. Each of the rpart objects has many values. Below you may see the code that generates rpart objects:
rpart.fit <- rpart(result ~ . , data = this.data ,
subset = train.index, method= "class",
control=rpart.control(maxdepth=1))
Edit: Updated the function to dynamicly compute a name for the model.