[R] apply and factor
Don MacQueen
macq at llnl.gov
Sat Aug 11 23:57:36 CEST 2001
Simpler still is to just type the name at the command line (without
parentheses, in case it's a function, in order to avoid unwanted side
effects).
If the name is already in use, it'll be obvious, equally obvious if it isn't.
Not suitable for use in a program, of course, and if the object
exists and is big a lot of stuff will spew, which can be annoying.
-Don
At 3:15 PM +0200 8/10/01, Laurent Gautier wrote:
>Jim Lemon wrote:
>>
>> Prof Brian Ripley wrote:
>> >
>> > There is a function conflicts() to do the checking.
>> > Deliberate overrides are fairly common, for example when debugging,
>> > and it is probably better to get into the habit of using conflicts()
>> > if you get strange results.
>> >
>> Martin Maechler kindly informed me of conflicts() after I had posted a
>> suggestion for dup.name(). However, conflicts() only tells you _after_
>> you have clobbered something, while dup.name() allows you to check
>> beforehand. I do agree that it is a time-consuming operation, as
>> dup.name() takes about 5 seconds to run. It's mostly useful to avoid
>> trashing a laboriously constructed data set in the working directory.
>>
>
>
>What about using exists() ?
>Then digging if something exists....
>
>Regards,
>
>Laurent
>
>--
>Laurent Gautier CBS, Building 208, DTU
>PhD. Student D-2800 Lyngby,Denmark
>tel: +45 45 25 24 85 http://www.cbs.dtu.dk/laurent
>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
--
--------------------------------------
Don MacQueen
Environmental Protection Department
Lawrence Livermore National Laboratory
Livermore, CA, USA
--------------------------------------
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list