From guillaume.yziquel at citycable.ch  Sun Jan 31 18:39:52 2010
From: guillaume.yziquel at citycable.ch (Guillaume Yziquel)
Date: Sun, 31 Jan 2010 18:39:52 +0100
Subject: [Rd] Stop packages and datasets to be loaded on startup.
In-Reply-To: <AC6F0479-121D-4070-ABE4-303FAB6AA7B7@r-project.org>
References: <4B645975.5040101@citycable.ch>
	<AC6F0479-121D-4070-ABE4-303FAB6AA7B7@r-project.org>
Message-ID: <4B65C068.6090002@citycable.ch>

Simon Urbanek a ?crit :
>>
>> So I gather that just setting R_DEFAULT_PACKAGES to NULL should be OK. But then, what is the rather complicated stuff in the autoload() function in littler.c for?
>>
>> And concerning datasets, how do you avoid loading them?
>>
> 
> Setting R_DEFAULT_PACKAGES to NULL makes sure that default packages are not loaded. Note that "datasets" are not loaded at all -- you can load the datasets package which will make them available, but they are not really "loaded". The minimal setup is simply
> 
> R_DEFAULT_PACKAGES=NULL R --vanilla
> 
> However, it's your responsibility to load any packages that your code needs in that case.
> 
> Cheers,
> Simon

OK. Thanks. Just one more question concerning package base. It seems 
that setting R_DEFAULT_PACKAGES to NULL doesn't remove the base package. 
Is the base package removable?

> yziquel at seldon:~$ ocaml
>         Objective Caml version 3.11.1
> 
> # #use "topfind";;
> - : unit = ()
> Findlib has been successfully loaded. Additional directives:
>   #require "package";;      to load a package
>   #list;;                   to list the available packages
>   #camlp4o;;                to load camlp4 (standard syntax)
>   #camlp4r;;                to load camlp4 (revised syntax)
>   #predicates "p,q,...";;   to set these predicates
>   Topfind.reset();;         to force that packages will be reloaded
>   #thread;;                 to enable threads
> 
> - : unit = ()
> # #require "R.interpreter";;
> /usr/lib/ocaml/unix.cma: loaded
> /usr/lib/ocaml/str.cma: loaded
> /usr/lib/ocaml/calendar: added to search path
> /usr/lib/ocaml/calendar/calendarLib.cma: loaded
> /usr/lib/ocaml/R: added to search path
> /usr/lib/ocaml/R/r.cma: loaded
> /usr/lib/ocaml/R/oCamlR.cmo: loaded
> # R.strings_of_t (R.eval_string "loadedNamespaces()");;
> - : string list = ["base"]
> # R.strings_of_t (R.eval_string "search()");;
> - : string list = [".GlobalEnv"; "Autoloads"; "package:base"]
> #

All the best,

-- 
      Guillaume Yziquel
http://yziquel.homelinux.org/



[Rd] Stop packages and datasets to be loaded on startup.
Guillaume Yziquel