[R-pkg-devel] if statements in NAMESPACE file

Andrew Simmons @kw@|mmo @end|ng |rom gm@||@com
Wed Sep 29 20:13:08 CEST 2021


I noticed in the Writing R Extensions manual, it says that within a
NAMESPACE file, "Only very simple conditional processing of if statements
is implemented.".
I tried it out myself by importing a Windows exclusive function:


if (.Platform$OS.type == "windows")
    importFrom(utils, getWindowsHandles)


It also says in the manual that a NAMESPACE file "is not processed as R
code", so I'm wondering if anyone knows exactly how if statements are
handled within a NAMESPACE file.

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list