plot: Plot the results of the perturbation table generator

plotR Documentation

Plot the results of the perturbation table generator

Description

plot() makes it easy to visualize the results of the created ptable-object that has been created by create_cnt_ptable(), create_cnt_ptable() or modify_cnt_ptable().

Usage

plot(obj, type = "d", file = NULL, ...)

Arguments

obj

an object of class ptable

type

(character) type of graph: distribution "d" (standard), perturbation panel ("p"), transition matrix "t"

file

if not NULL, a path to a file (with file extension, e.g. '.pdf' or '.png') where the graph is saved to

...

additional parameters passed to methods

Value

The selected graph is displayed, but there is no direct return value. The output could also be assigned to an object to receive an object of class ggplot.

Author(s)

Tobias Enderle

Examples


# Create a ptable for frequency count tables and modify the intervals
ptab <- create_cnt_ptable(D = 3, V = 1.05, js = 1, label = "Example")
ptab_mod <- modify_cnt_ptable(ptab, threshold = 0.3, seed = 5432)

# Distribution Plot of the Noise
plot(ptab_mod, type = "d")

# Perturbations Panel of the Noise
plot(ptab_mod, type = "p")


## Plot and Save the Transition Matrix
plot(ptab_mod, type ="t", 
     file = tempfile("example_tMatrix", fileext = ".pdf"))



tenderle/ptable documentation built on March 5, 2023, 3:35 a.m.