From hp@ge@@on@g|thub @end|ng |rom gm@||@com  Sun Feb  4 06:28:57 2024
From: hp@ge@@on@g|thub @end|ng |rom gm@||@com (=?UTF-8?B?SGVydsOpIFBhZ8Oocw==?=)
Date: Sat, 3 Feb 2024 21:28:57 -0800
Subject: [Rd] =?utf-8?q?NOTE=3A_multiple_local_function_definitions_for_?=
 =?utf-8?q?=E2=80=98fun=E2=80=99_with_different_formal_arguments?=
Message-ID: <d21ed424-ffa4-4f1c-b743-306a443989c4@gmail.com>

Hi,

I just ran into this 'R CMD check' NOTE for the first time:

* checking R code for possible problems ... NOTE
toto: multiple local function definitions for ?fun? with different
 ? formal arguments

The "offending" code is something like this (simplified from the real code):

toto <- function(mode)
{
 ??? if (mode == 1)
 ??????? fun <- function(a, b) a*b
 ??? else
 ??????? fun <- function(u, v, w) (u + v) / w
 ??? fun
}

Is that NOTE really intended? Hard to see why this code would be 
considered "wrong".

I know it's just a NOTE but still...

Thanks,

H.

-- 
Herv? Pag?s

Bioconductor Core Team
hpages.on.github at gmail.com

	[[alternative HTML version deleted]]



[Rd] =?utf-8?q?NOTE=3A_multiple_local_function_definitions_for_?= =?utf-8?q?=E2=80=98fun=E2=80=99_with_different_formal_arguments?=
=?UTF-8?B?SGVydsOpIFBhZ8Oocw==?=