[R] Removing named objects using rm(..)

Martin Maechler maechler at stat.math.ethz.ch
Tue Dec 11 10:52:29 CET 2012


>>>>> "WR" == Worik R <worikr at gmail.com>
>>>>>     on Tue, 11 Dec 2012 19:59:58 +1300 writes:

    WR> On Tue, Dec 11, 2012 at 7:49 PM, Jeff Newmiller <jdnewmil at dcn.davis.ca.us>wrote:
    >> What about putting your objects in a list, which does not have the search
    >> through parents semantics?
    >> ---------------------------------------------------------------------------
    >> 
    >> 

    >>> 
    >>> You may find it more reliable to define an environment in which you
    >>> will be storing your data (perhaps globalenv(), perhaps something
    >> created
    >>> by new.env())  and then testing for existence of a dataset by a given
    >> name
    >>> in that environment.

    WR> Both  interesting ideas.

Well,  Do follow only Bill Dunlap's.
Using environments is *the way* to add and remove variables,


    WR> Turns out I can remove 'timeSeries' so that  solves my problem but does not
    WR> answer my questions.

When are taught to use  get(),  and it does not immediately do
what you want,
why not read its help page and look at the examples on that help
page ??

[Hint:  The optional argument you want start with 'in..']

Martin




More information about the R-help mailing list