I have problem with creating list of models. Suppose I've created model:
> rp <- rpart(V41 ~ ., data=learnData, method="class")
If I'm creating list straight, thats OK:
> ll <- list(rp, rp, rp)
> class(ll[[1]])
[1] "rpart"
> class(ll[[2]])
[1] "rpart"
> class(ll[[3]])
[1] "rpart"
But if I'm trying to append model to already created list, models changing their class to data.frame:
> ll <- list(rp)
> ll <- append(ll, rp)
> class(ll[[1]])
[1] "rpart"
> class(ll[[2]])
[1] "data.frame"
What's a reason of this behavior and how can I append model to list?