[R-SIG-Mac] suppressPackageStartupMessages() does not work on the command line version R (but works on the GUI version)
Simon Urbanek
simon.urbanek at r-project.org
Mon Jun 11 16:26:47 CEST 2012
On Jun 11, 2012, at 10:15 AM, Peng Yu wrote:
> On Mon, Jun 11, 2012 at 8:47 AM, peter dalgaard <pdalgd at gmail.com> wrote:
>>
>> On Jun 11, 2012, at 13:04 , peter dalgaard wrote:
>>
>>>
>>> On Jun 11, 2012, at 12:21 , Peng Yu wrote:
>>>
>>>> Hi,
>>>>
>>>> suppressPackageStartupMessages works in the GUI version of R on my
>>>> Mac. But it does not work in the command line version of R. Could
>>>> anybody take a look what is wrong with the command line version?
>>>> Thanks!
>>>>
>>> ....
>>>>
>>>>> suppressMessages(library(MCMCpack))
>>>> ##
>>>> ## Markov Chain Monte Carlo Package (MCMCpack)
>>>> ## Copyright (C) 2003-2012 Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park
>>>> ##
>>>> ## Support provided by the U.S. National Science Foundation
>>>> ## (Grants SES-0350646 and SES-0350613)
>>>> ##
>>>
>>> Not to put too fine a point on it:
>>>
>>>> suppressPackageStartupMessages(library(MCMCpack))
>>>>
>>>
>>
>> (in which our ever beloved, user-friendly and helpful OSX Mail application has converted R's prompt character to a vertical bar, as if the ">" were indicating citation from a previous message. Therefore, it is not immediately obvious that the above command does indeed suppress package startup messages....)
>>
>
> It is my mistake for putting the wrong command. Here is the output for
> suppressPackageStartupMessages in the command line version R on Mac.
>
> I have had a second person to try it on his system. And he observed
> the same behavior. Would you please try it on your system to see if
> you get the same behavior?
>
At least in (even old) R-patched it seems just fine:
> suppressPackageStartupMessages(library(MCMCpack))
> sessionInfo()
R version 2.15.0 Patched (2012-04-03 r58917)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] MCMCpack_1.2-3 MASS_7.3-17 coda_0.14-7 lattice_0.20-6
loaded via a namespace (and not attached):
[1] grid_2.15.0 tools_2.15.0
Cheers,
S
>> suppressPackageStartupMessages(library(MCMCpack))
> ##
> ## Markov Chain Monte Carlo Package (MCMCpack)
> ## Copyright (C) 2003-2012 Andrew D. Martin, Kevin M. Quinn, and Jong Hee Park
> ##
> ## Support provided by the U.S. National Science Foundation
> ## (Grants SES-0350646 and SES-0350613)
> ##
>
>
> ~$ R --version
> R version 2.15.0 (2012-03-30)
> Copyright (C) 2012 The R Foundation for Statistical Computing
> ISBN 3-900051-07-0
> Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
>
> R is free software and comes with ABSOLUTELY NO WARRANTY.
> You are welcome to redistribute it under the terms of the
> GNU General Public License versions 2 or 3.
> For more information about these matters see
> http://www.gnu.org/licenses/.
>
>
>
> --
> Regards,
> Peng
>
> _______________________________________________
> R-SIG-Mac mailing list
> R-SIG-Mac at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-mac
>
>
More information about the R-SIG-Mac
mailing list