From jorismeys at gmail.com  Tue Sep  6 15:25:28 2016
From: jorismeys at gmail.com (Joris Meys)
Date: Tue, 6 Sep 2016 15:25:28 +0200
Subject: [Rd] The use of match.fun
Message-ID: <CAO1zAVYQg+Pa2uAF4OVLGSUk7EMFTMbjmpTpmzEnt8X8mHV1Qw@mail.gmail.com>

Dear gurus,

I was utterly surprised to learn that one of my examples illustrating the
need of match.fun() doesn't give me the expected result.

center <- function(x,FUN) FUN(x)
center(1:10, mean)
mean <- 4
center(1:10, mean)

Used to give me the error message "could not find function FUN". Now it
just works, even though I didn't expect it to. I believe this is at least
partially linked to a change in how R finds functions.

Now I'm not sure any more whether match.fun() actually has any use any
longer, and if so, in which cases it prevents things going wrong.

I've tried to find an example where this went wrong, but couldn't find one.
Any pointer to what happened here is greatly appreciated. I've checked the
NEWS, but I'm not smart enough to find the relevant bits and piece it
together.

Thank you in advance
Cheers
Joris

-- 
Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Mathematical Modelling, Statistics and Bio-Informatics

tel :  +32 (0)9 264 61 79
Joris.Meys at Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

	[[alternative HTML version deleted]]



[Rd] The use of match.fun
Joris Meys