Silence console output when running Maaslin2

Hello Maaslin2 authors,

first of all, thank you for this great piece of software!

I am running Maaslin2 in an RMarkdown-document, where I extract the results from the Maaslin2-run, and create my own custom plots and tables downstream.

I wish to not display all the console-output associated with running the Maaslin2-command, but can’t seem to find an implemented way to do this. (I know I can silence output for the R-code chunk in the markdown-code, but it would feel cleaner if there was no console output to silence in the first place).

Is there such an argument already that I have missed? If not, I hope it can be added at some point in the future.

Cheers

Hi @SimenHyllHansen - capture.output is one way to achieve that. You need to wrap your entire MaAsLin 2 call within the function something along the lines of capture.output(fit<-Maaslin2(...)). I hope this helps.

1 Like