[R] the difference between temp and .temp
Rolf Turner
r.turner at auckland.ac.nz
Fri Oct 26 01:11:52 CEST 2007
On 26/10/2007, at 11:44 AM, Tim Calkins wrote:
> Hi everyone -
>
> This came up within the last day -- Jim's response to Deepankar is
> pasted below.
(but snipped out of this response).
> There are probably lots of reasons, but what is the advantage to using
> .temp over, say, temp?
>
> I often find myself writing temporary objects -- should I use the .
> preface? What would be the advantages to doing so?
>
> Thanks in advance for what will surely be a collection of illuminating
> responses.
The difference is that you see ``temp'' when you do an ls() of your
workspace, and you don't see ``.temp'' --- it's hidden. Unless you ask
particularly nicely!
The advantage of using .temp is that you can't see it (so it doesn't
clutter things up).
The ***dis**advantage of using .temp is that you can't see it! :-)
I guess the rationale for using .temp is the presumption that if you
can't see it
you don't really want it. I.e. overwriting something called .temp is
unlikely to lose
you an object that you desperately wanted to keep. If you were
passionately fond
of the contents of .temp, you would've named the object in such a way
that you
could look at it from time to time without having to make a special
effort (having to set
all.names=TRUE).
OTOH something called temp is unlikely to be something of which you are
passionately fond anyhow.
cheers,
Rolf Turner
######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}
More information about the R-help
mailing list