Remove multiple objects with rm()

后端 未结 4 985
日久生厌
日久生厌 2020-11-28 03:56

My memory is getting clogged by a bunch of intermediate files (call them temp1, temp2, etc). Is it possible to remove them from memory without doing rm(temp1),

4条回答
  •  执念已碎
    2020-11-28 04:23

    Make the list a character vector (not a vector of names)

    rm(list = c('temp1','temp2'))
    

    or

    rm(temp1, temp2)
    

提交回复
热议问题