This is a result of bugs in rattle.

The first bug is that you are explicitly asked on its help page not to use installed.packages() in that way.

Second, packages should be able to be loaded in a session with just base loaded, so rattle's startup code should have utils::installed.packages(). (In this case it is invoked from rattle(), AFAICS, hence not invoked in the loading tests in R CMD check.)

However, your startup code is wrong: from ?options

     ‘defaultPackages’: the packages that are attached by default when
          R starts up.  Initially set from value of the environment
          variable ‘R_DEFAULT_PACKAGES’, or if that is unset to
          ‘c("datasets", "utils", "grDevices", "graphics", "stats",
          "methods")’.  (Set ‘R_DEFAULT_PACKAGES’ to ‘NULL’ or a
          comma-separated list of package names.)
          ^^^^^^^^^^^^^^^

And by default, R_DEFAULT_PACKAGES is unset.  Try

sh -c 'R_DEFAULT_PACKAGES="datasets,utils,grDevices,graphics,stats,rattle" R 
"$@"'

(You may or may not need 'methods' as well.)

On Sat, 16 Apr 2011, Iurie Malai wrote:

I tried this:

sh -c 'R_DEFAULT_PACKAGES="$R_DEFAULT_PACKAGES rattle" R "$@"'

but without success. I get this message:

R version 2.13.0 (2011-04-13)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: i486-pc-linux-gnu (32-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

 Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

Rattle: A free graphical interface for data mining with R.
Version 2.6.6 Copyright (c) 2006-2011 Togaware Pty Ltd.
Error : .onAttach failed in attachNamespace() for 'rattle', details:
 call: rownames(installed.packages())
 error: could not find function "installed.packages"
Rattle: A free graphical interface for data mining with R.
Version 2.6.6 Copyright (c) 2006-2011 Togaware Pty Ltd.
Error : .onAttach failed in attachNamespace() for 'rattle', details:
 call: rownames(installed.packages())
 error: could not find function "installed.packages"
In addition: Warning message:
package ???rattle??? in options("defaultPackages") was not found
During startup - Warning message:
package ???rattle??? in options("defaultPackages") was not found


2011/4/16 Iurie Malai <iurie.ma...@gmail.com>

How to make a launcher for Rattle?

Regards,
Iurie Malai
Moldova Pedagogical State University


        [[alternative HTML version deleted]]



--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595
______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to