questions relating to workspace

9 views
Skip to first unread message

G.Chan

unread,
Mar 5, 2013, 3:45:18 AM3/5/13
to hk...@googlegroups.com
Hi All, 

How can i delete several objects within my R workspace?

Many thanks 

GC


Chung-hong Chan

unread,
Mar 5, 2013, 3:55:38 AM3/5/13
to hk...@googlegroups.com
?rm actually gives some useful information. The first argument is ... and it is the objects to remove. You can put whatever names in ..., except it has the same name as the other arguments of rm(). i.e., list, post, envir and inherits

Therefore, you can

a <- 1
b <- 2
c <- 3
d <- 4
ls()
rm(a,b,c) # remove 3 objects simultaneously, alternatively rm(list=c("a", "b", "c"))
ls() # only d left
rm(list=ls()) #zap the workspace

Geoff Chan

unread,
Mar 5, 2013, 3:59:10 AM3/5/13
to hk...@googlegroups.com
Very well explained .. Many thanks 

GC


--
You received this message because you are subscribed to the Google Groups "Hong Kong R User group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hkrug+un...@googlegroups.com.
To post to this group, send email to hk...@googlegroups.com.
Visit this group at http://groups.google.com/group/hkrug?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages