更新时间:2023-12-01 22:14:40
现在更好的解决方案是使用 saveRDS 保存和 readRDS 读取:
A better solution nowadays is to use saveRDS to save and readRDS to read:
saveRDS(model, "model.rds")
my_model <- readRDS("model.rds")
这让您可以为对象选择一个新名称(您无需记住保存时使用的名称)
This lets you to choose a new name for the object (you don't need to remember the name you used when you saved it)