I'm using sweave and my r chunk uses the package Zelig, which produces a message every time it loads. I've tried everything from message=FALSE, warnings=F, comment=F, as well as suppressMessages(library(Zelig)). Nothing works! any ideas?
            Asked
            
        
        
            Active
            
        
            Viewed 146 times
        
    0
            
            
         
    
    
        David Arenburg
        
- 91,361
- 17
- 137
- 196
 
    
    
        Cyrus Mohammadian
        
- 4,982
- 6
- 33
- 62
- 
                    Did you try [this](http://stackoverflow.com/questions/13090838/r-markdown-avoiding-package-loading-messages)? – David Arenburg Mar 14 '16 at 10:29
- 
                    yes, hence my statement "I've tried everything from.... – Cyrus Mohammadian Mar 14 '16 at 10:56
- 
                    I've also tried suppressPackageStartupMessages to no avail – Cyrus Mohammadian Mar 14 '16 at 11:23
- 
                    Does `everything` include `include = FALSE`? (Cannot test it at the moment because a dependency of `Zelig` is not yet available for R3.2.4). – CL. Mar 14 '16 at 11:32
- 
                    include=F does not work either – Cyrus Mohammadian Mar 14 '16 at 11:33
- 
                    I also tried invisible(library(Zelig)) -doesnt work... – Cyrus Mohammadian Mar 14 '16 at 11:41
- 
                    1Which package and R version are you using? I don't get any startup message using Zelig 5.0-9 and R3.2.4. – CL. Mar 14 '16 at 14:38
- 
                    I'm using 3.2.2 but on my other computer i have 3.2.4 and Zelig doesn't load bc of a dependency problem related the graphs package (I asked others to check on their systems to verify it wasn't unique to my computer and they all faced the same problem) – Cyrus Mohammadian Mar 14 '16 at 23:58
1 Answers
0
            Ok so my work around is to load the Zelig library in a separate chunk than the rest of my code and to use results=hide like in the following example:
    TEXT
    <<results=hide, echo=FALSE, cache=FALSE, warning=FALSE, comment=FALSE, warning=FALSE>>=
    library(Zelig) 
    @
    TEXT
    <<>>=
    CODE
    @
 
    
    
        Cyrus Mohammadian
        
- 4,982
- 6
- 33
- 62
- 
                    Does it produce the same message with `require()` instead of `library()`? – Rich Scriven Mar 15 '16 at 00:55
-