From p.dalgaard at biostat.ku.dk  Fri Oct 27 16:24:10 2006
From: p.dalgaard at biostat.ku.dk (Peter Dalgaard)
Date: 27 Oct 2006 16:24:10 +0200
Subject: [Rd] as.missing
In-Reply-To: <45420FE2.5090000@bank-banque-canada.ca>
References: <453E462C.6050103@bank-banque-canada.ca>
	<971536df0610250928q615c2e4dl950e8f576c492789@mail.gmail.com>
	<4540CC71.1010108@bank-banque-canada.ca>
	<971536df0610261830o4d36376bk4b90d42e218eb2d0@mail.gmail.com>
	<m0hcxq3z2a.fsf@bar.nemo-project.org>
	<45420FE2.5090000@bank-banque-canada.ca>
Message-ID: <x2pscdltv9.fsf@turmalin.kubism.ku.dk>

Paul Gilbert <pgilbert at bank-banque-canada.ca> writes:

> >I.e., when x is missing in g, and g calls f(3,x), f will use its
> >default value for x.
> >  
> >
> Yes, that is the behaviour I am looking for. That is, f  should do what 
> it normal would do if it were called with x missing.

But if x has a default in g then that default should presumably be
used? And what if x is given a value in the evaluation frame of g
before it is used by f (which can happen, you know, even after the
evaluation of f has begun)? Now imagine a longer chain of calls.

I think what you're asking for is essentially dynamic scoping for
missing arguments: you'd have to backtrack along the call chain to
find the first instance where x is either given a value or has a
default. This sounds messy.

-- 
   O__  ---- Peter Dalgaard             ?ster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907




[Rd] as.missing
Peter Dalgaard