Create a pairs plot where the lower left half comprises either
fried egg contours or smoke ring contours, the upper right half
comprises glasses of beer filled to the correlation point, and
the diagonals show frequency histograms of the input data.
logical: if TRUE, blow smoke rings in the lower panels.
levs
explicit contour levels expressed as quantiles.
pepper
number of samples to draw from A to pepper the plots.
replace
logical: if TRUE, sample A with replacement.
jitt
argument factor used by function base::jitter when peppering.
If user supplies two numbers, the first will jitter x, the second will
jitter y.
bw
argument bandwidth used by function KernSmooth::bkde2D.
histclr
user-specified colour(s) for histogram bars along the diagonal.
Details
This function comes to us from Dr. Steve Martell of the Fisheries Science
Centre at UBC. Obviously many hours of contemplation with his students at
the local pub have contributed to this unique rendition of a pairs plot.
Note
If eggs=TRUE and rings=FALSE, fried eggs are served.
If eggs=FALSE and rings=TRUE, smoke rings are blown.
If eggs=TRUE and rings=TRUE, only fried eggs are served.
If eggs=FALSE and rings=FALSE, only pepper is sprinkled.
Author(s)
Steve Martell, International Pacific Halibut Commission, Seattle WA
local(envir=.PBSmodEnv,expr={
oldpar = par(no.readonly=TRUE)
x=rnorm(5000,10,3); y=-x+rnorm(5000,1,4); z=x+rnorm(5000,1,3)
A=data.frame(x=x,y=y,z=z)
for (i in 1:3)
switch(i,
{plotFriedEggs(A,eggs=TRUE,rings=FALSE);
pause("Here are the eggs...(Press Enter for next)")},
{plotFriedEggs(A,eggs=FALSE,rings=TRUE);
pause("Here are the rings...(Press Enter for next)")},
{plotFriedEggs(A,eggs=FALSE,rings=FALSE);
cat("Here is the pepper alone.\n")} )
par(oldpar)
})
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(PBSmodelling)
Error in library(PBSmodelling) :
there is no package called 'PBSmodelling'
Execution halted