From dmurdoch at pair.com  Fri Apr 16 19:07:00 2004
From: dmurdoch at pair.com (dmurdoch@pair.com)
Date: Fri Apr 16 19:07:03 2004
Subject: [Rd] Windows startup menu display problem in 1.9.0 (PR#6783)
Message-ID: <20040416170700.9742B1043B@slim.kubism.ku.dk>

On Fri, 16 Apr 2004 18:50:18 +0200 (CEST), brian-j-smith@uiowa.edu
wrote :

>Full_Name: Brian J. Smith
>Version: 1.9.0
>OS: WinXp
>Submission from: (NULL) (129.255.217.48)
>
>
>WinXP; R 1.9.0 running under Rgui.exe.
>
>winMenuAdd calls via my .Rprofile file do not seem to work and, instead, result
>in the following error message after the R GUI starts:
>
>   Error in eval(expr, envir, enclos) : couldn't find function "winMenuAdd"
>
>Any subsequent calls to winMenuAdd from the R console GUI window work fine.  The
>same Rprofile works fine under R 1.8.1.  Bug report #2817 describes a similar
>problem that occurred with R 1.7.0.

This isn't a bug, it's behaving as documented.  At the time that
.Rprofile is being executed, only the base package has been attached.
If you want access to functions that aren't in base, you need to do
something like

require(utils)
winMenuAdd( .... )

or

utils::winMenuAdd( .... )

The reason for this is that you may want your Rprofile to change the
list of packages that are attached at the start of a session.  I don't
think this behaviour has changed since 1.8.1, but winMenuAdd has been
moved out of the base package, so now you notice it.

Duncan Murdoch


[Rd] Windows startup menu display problem in 1.9.0 (PR#6783)
dmurdoch@pair.com