[R] Silently loading an R package.
Guillaume Yziquel
guillaume.yziquel at citycable.ch
Sat Nov 14 17:02:16 CET 2009
Yihui Xie a écrit :
> please read the 'Details' section of ?require
>
> To suppress messages during the loading of packages use
> 'suppressPackageStartupMessages': this will suppress all messages
> from R itself but not necessarily all those from package authors.
>
> Regards,
> Yihui
Thank you so much...
Guillaume Yziquel.
> --
> Yihui Xie <xieyihui at gmail.com>
> Phone: 515-294-6609 Web: http://yihui.name
> Department of Statistics, Iowa State University
> 3211 Snedecor Hall, Ames, IA
>
>
>
> On Fri, Nov 13, 2009 at 6:02 PM, Guillaume Yziquel
> <guillaume.yziquel at citycable.ch> wrote:
>> Hello.
>>
>> I've been working an a binding between OCaml and R (i.e. calling R from
>> OCaml, mostly). See below for a taste of it.
>>
>> I'm currently wondering how to load a given R package silently. I tried
>>
>> require(xts, quietly = TRUE)
>>
>> but I still get some ugly output. Is it possible to squeeze off this output
>> on stdout?
>>
>> All the best,
>>
>> Guillaume Yziquel.
>>
>>
>>> yziquel at seldon:~$ ocaml-batteries Objective Caml version 3.11.1
>>>
>>> _________________________________
>>> | | | |
>>> [| + | | Batteries Included - |
>>> |_______|_|_______________________|
>>> _________________________________
>>> | | | |
>>> | - Type '#help;;' | | + |]
>>> |_______________________|_|_______|
>>>
>>>
>>> # #require "R.interpreter";;
>>> # R.sexp "require(xts)";;
>>> Le chargement a nécessité le package : xts
>>> Le chargement a nécessité le package : zoo
>>>
>>> Attachement du package : 'zoo'
>>>
>>>
>>> The following object(s) are masked from package:base :
>>>
>>> as.Date.numeric
>>> xts now requires a valid TZ variable to be set
>>> no TZ var is set, setting to TZ=GMT
>>> - : R.sexp = <abstr>
>>> #
>> --
>> Guillaume Yziquel
>> http://yziquel.homelinux.org/
--
Guillaume Yziquel
http://yziquel.homelinux.org/
More information about the R-help
mailing list