Skip to content
Prev 21051 / 63424 Next

about integration of a library into package creation

Nicolas Turenne wrote:
R has a reasonably sophisticated scheme for setting the scope of 
variables.  Variables in the base package are "global" for most 
purposes.  Variables in the user workspace are global in the sense that 
they are visible to most functions.

What the error message means is that you have two variables named 
findModelCluster, in two locations:  one in the user workspace 
(.GlobalEnv), and another in your package.  Since you are using a 
namespace, your package code will see your copy, but most other users 
will see the .GlobalEnv copy.

If this isn't enough to clear things up, you should describe what you 
want to do, rather than how you want to do it.  Terms like "global 
variables" from other languages don't always make sense in R.

Duncan Murdoch

Thread (19 messages)

Nicolas Turenne about integration of a library into package creation Jun 12 Duncan Murdoch about integration of a library into package creation Jun 12 Nicolas Turenne about integration of a library into package creation Jun 12 Brian Ripley about integration of a library into package creation Jun 12 Nicolas Turenne about integration of a library into package creation Jun 12 Duncan Murdoch about integration of a library into package creation Jun 12 Nicolas Turenne about integration of a library into package creation Jun 12 Uwe Ligges about integration of a library into package creation Jun 12 Martin Maechler about integration of a library into package creation Jun 12 Nicolas Turenne about integration of a library into package creation Jun 13 Uwe Ligges about integration of a library into package creation Jun 13 Duncan Murdoch about integration of a library into package creation Jun 13 Nicolas Turenne about integration of a library into package creation Jun 13 Duncan Murdoch about integration of a library into package creation Jun 13 Nicolas Turenne about integration of a library into package creation Jun 13 Duncan Murdoch about integration of a library into package creation Jun 13 Nicolas Turenne about integration of a library into package creation Jun 13 Brian Ripley about integration of a library into package creation Jun 13 Nicolas Turenne about integration of a library into package creation Jun 14