Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R: don't write log file for VennDiagram

Tags:

r

venn-diagram

I use R (version 3.1.2) and the package VennDiagram (version 1.6.16).

Since my last update the VennDiagram package creates a log file called VennDiagramDATE_TIME.log (with DATE and TIME being date and time at creation) in the current working directory.

How can suppress this log file? Or delete it as soon as the diagram is done? I haven't found anything about this in the manual...

like image 608
Jonas Avatar asked Oct 28 '15 14:10

Jonas


People also ask

How to create a Venn diagram in R?

The ggVennDiagram package maps the fill color of each region to quantity, allowing us to visually observe the differences between different parts. Create a Venn diagram and save it into a file. The function venn.diagram () takes a list and creates a file containing a publication-quality Venn Diagram. Display the plot directly in R:

How many lines of your does it take to read log data?

It only takes a few lines of R to read in a log file (of a reasonable size), format the data, and generate some usable charts. Like most good ideas – it is not new.

What is the venndiagram package?

Note that the VennDiagram package provides further functions for more complex venn diagrams with multiple sets, i.e. draw.quad.venn, draw.quintuple.venn, or the more general function venn.diagram, which is taking a list and creates a TIFF-file in publication-quality.

What is ggvenndiagram in R?

Using the ggVennDiagram R package This package is a ggplot2 extension. The ggVennDiagram package maps the fill color of each region to quantity, allowing us to visually observe the differences between different parts.


Video Answer


2 Answers

Like Ed Hagen already mentioned, VennDiagram is making usage of the futile.logger package. You can suppress logging messages below ERROR severity, by setting the threshold to the corresponding logger. In your case:

futile.logger::flog.threshold(futile.logger::ERROR, name = "VennDiagramLogger")
venn.diagram(...)

should do the trick.

For more infomation about the usage of futile.logger see http://www.r-bloggers.com/better-logging-in-r-aka-futile-logger-1-3-0-released/.

like image 163
daggett Avatar answered Sep 22 '22 15:09

daggett


VennDiagram uses the futile.logger package. To suppress logging, try:

flog.threshold(ERROR)
like image 21
Ed Hagen Avatar answered Sep 21 '22 15:09

Ed Hagen