On 9/11/06, Prof Brian Ripley <[EMAIL PROTECTED]> wrote:
> On Mon, 11 Sep 2006, Deepayan Sarkar wrote:
>
> > Hi,
> >
> > I know S manuals used to warn against using the same names for a
> > variable and a function, but I have never seen that cause problems in
> > R, so I usually don't pay much atte
On Mon, 11 Sep 2006, Deepayan Sarkar wrote:
> Hi,
>
> I know S manuals used to warn against using the same names for a
> variable and a function, but I have never seen that cause problems in
> R, so I usually don't pay much attention to it.
But in this case you have a promise. (BTW, it can sti
Sorry I forgot one of the dots. Here it is corrected:
> bar <- function() 1
> foo <- function(bar. = bar()) {
+ bar.
+ }
> foo()
[1] 1
> foo(bar = bar)
function() 1
On 9/12/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> You can't have x=x in an argument list.
>
> Try the following noti
You can't have x=x in an argument list.
Try the following noting that we put a dot at the end of bar:
> bar <- function() 1
> foo <- function(bar. = bar()) {
+ bar
+ }
> foo()
function() 1
> foo(bar = bar)
function() 1
On 9/11/06, Deepayan Sarkar <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I know
Hi,
I know S manuals used to warn against using the same names for a
variable and a function, but I have never seen that cause problems in
R, so I usually don't pay much attention to it. Which is why the
following behaviour came as a surprise:
> bar <- function() 1
> foo <- function(bar = bar())