Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to avoid to print the vcfR header? #191

Open
Shicheng-Guo opened this issue Sep 11, 2021 · 2 comments
Open

How to avoid to print the vcfR header? #191

Shicheng-Guo opened this issue Sep 11, 2021 · 2 comments

Comments

@Shicheng-Guo
Copy link

How to avoid to print the vcfR header? It gives me some trouble for further analysis to the log files. Thanks

   *****       ***   vcfR   ***       *****
   This is vcfR 1.12.0
     browseVignettes('vcfR') # Documentation
     citation('vcfR') # Citation
   *****       *****      *****       *****
@knausb
Copy link
Owner

knausb commented Sep 11, 2021

Hi @Shicheng-Guo , I'm afraid I do not understand your question. Your post reports the results of the show() method. This means that you had to have requested this information. Can you create a minimal reproducible example to illustrate the behavior you'd like to change? I have some suggestions here.

@J-Moravec
Copy link

@knausb This is not output of show() method, but of .onAttach function/hook: https://github.com/knausb/vcfR/blob/master/R/zzz.R

@Shicheng-Guo its annoying, isn't it? The only way to do this is with suppressStartupMessages(library("vcfR")).

Since some people just put message() instead of packageStartupMessage() in their .onAttach code, sometimes you need to do suppressMessages(library(pkg)).

Define it as silent function, like Dirk did, and use it for these annoying pkgs:

https://rdrr.io/github/eddelbuettel/dang/src/R/load.R

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants