Save separate element from object to Rdata in R

时间:2018-06-04 17:21:43

标签: r imputation rdata

This kind of question is already on Stackoverflow but it did not seem to solve my 'specific' problem.

I am imputing missing values into a dataset with the imputation package missForest. The output is a list with two elements and one of them is ximp which stores the imputed dataset. This dataset I want to save as a .Rdata file. However, R keeps giving me an error that it cannot find ximp. My code is as follows:

save(random_forest2.1$ximp, file = "random_forest21.Rdata")

The random_forest2.1 (Large missForest(2 elements, 8.7 mb)) is the object that stores and processes the imputation model.

How do I alter the save() function, so one element from that object can be saved?

0 个答案:

没有答案