How to delete all "Values" in RStudio?

I know that rm (list = ls ()) can delete all objects in the current environment.

However, the environment has three categories: data, values, functions. I wonder how I can delete only all objects in one specific category? Sort of

rm(list=ls(type="Values"))
+4
source share
2 answers

You can use ls.strto indicate functions modeor lsf.strfor functions. Functions have printing methods that make it look different, but underneath are just object name vectors, so

rm(list = lsf.str())

will remove all user functions and

rm(list = ls.str(mode = 'numeric'))

( ). mode , data.frames .

+4

, , - , RStudio. = , . , , = (, ). , R-.

0

Source: https://habr.com/ru/post/1675673/


All Articles