whist: whist

Description Usage Arguments Examples

Description

Create and save histograms as .pdf, in "OutDir". If mdlink =T, it inserts a .pdf and a .png link in the markdown report, set by "path_of_report". The .png version is not created, only the link is put in place, not to overwrite previous versions. Name the file by naming the variable! Cannot be used with dynamically called variables [e.g. call vectors within a loop]. "filtercol" assumes >= coloring!

Usage

1
2
3
4
5
6
whist(variable, breaks = 20, col = "gold1",
  plotname = substitute(variable), main = kollapse("Histogram of ",
  substitute(variable)), xlb = substitute(variable), hline = F, vline = F,
  lty = 2, lwd = 3, lcol = 1, filtercol = 0,
  savefile = UnlessSpec("b.save.wplots"), w = UnlessSpec("b.defSize", 7),
  h = w, mdlink = ww.set.mdlink(), ...)

Arguments

variable

The variable to plot.

breaks

Number of bins.

col

Color of the plot.

plotname

The name of the file.

main

Title of the plot.

xlb

X-axis label.

vline

Draw a vertical line at the value you pass on to it. Useful to display a threshold. Design the line by "lty", "lwd" & "lcol" parameters.

lty

Linetype, defined by numbers 1-6.

lwd

Line width. Set to 2 by default.

lcol

Color of the line.

filtercol

Color bars below / above the threshold with red / green. Define the direction by -1 or 1. Takes effect if "vline" is defined.

savefile

Save plot as pdf in OutDir, TRUE by default.

w

Width of the saved pdf image, in inches.

h

Height of the saved pdf image, in inches.

mdlink

Insert a .pdf and a .png image link in the markdown report, set by "path_of_report".

...

Pass any other parameter of the corresponding plotting function (most of them should work).

Examples

1
whist (variable =  , col = gold1, w = 7, h = w, plotname = substitute(variable), breaks = 20, main = kollapse("Histogram of ", substitute(variable)), xlb = substitute(variable), mdlink = F, hline = F, vline = F, lty = 2, lwd = 3, lcol = 2, filtercol = 0, ... =  )

vertesy/MarkdownReports.v2.9.5 documentation built on May 22, 2019, 4 p.m.