rm(list=ls()) doesn't completely clear the workspace

前端 未结 7 1358
一向
一向 2020-12-08 04:36

This is a very minor issue, but I would like to understand exactly what is going on here.

Say I do the following:

library(RMySQL)
con <- dbConnect         


        
7条回答
  •  甜味超标
    2020-12-08 05:15

    R itself says, in the help for rm:

    ## remove (almost) everything in the working environment.
    ## You will get no warning, so don't do this unless you are really sure.
    rm(list = ls())
    

    Note the 'almost'. There are different environments.

    Did you try detach(values1)?

提交回复
热议问题