Description Usage Arguments Details See Also Examples
View source: R/RankPlotWithTable.R
RankPlotWithTable
aligns a table of ranking data with a plot of the
data, in one combined figure. See RankTable
and
RankPlot
for details about the default table and plot
functions, including arguments that can be passed to those functions.
1 2 3 4 5 6 7 8 9 10 11 |
tableParList |
A required named list of arguments that will be passed
to |
plotParList |
A required named list of arguments that will be passed
to |
tableFunction |
The function to use for plotting a table of the data
on the left-hand side of the layout. Default is |
plotFunction |
The function to use for plotting a figure of the data
on the right-hand side of the layout. Default is |
tableWidthProp |
A number between 0 and 1, for what proportion of the
layout's width should be used to plot the table. The remaining proportion
|
tikzText |
Logical, formats text for tikz plotting if |
annotRefName, annotRefRank |
Optional rank and name of the reference
area, for adding an extra
annotation below the figure created by |
annotX |
A number, showing where on the x-axis to center the annotation
if |
Users may write their own table and plot functions to swap into
tableFunction
and plotFunction
. Be aware that
RankPlotWithTable
uses layout
to arrange
the table and plot side-by-side, so layout
cannot be used within
either tableFunction
or plotFunction
. This can also cause
trouble for using the lattice
package within plotFunction
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | # Table with plot of individual 90% confidence intervals
# for US states' mean travel times to work, from the 2011 ACS
data(TravelTime2011)
tableParList <- with(TravelTime2011,
list(ranks = Rank, names = State,
est = Estimate.2dec, se = SE.2dec,
placeType = "State"))
plotParList <- with(TravelTime2011,
list(est = Estimate.2dec, se = SE.2dec,
names = Abbreviation,
confLevel = .90, plotType = "individual", cex = 0.6))
RankPlotWithTable(tableParList = tableParList,
plotParList = plotParList)
# Illustrating the use of annotRefName and annotRefRank:
# Table with plot of 90% confidence intervals for differences
# between each state and Colorado, with demi-Bonferroni correction
plotParList$plotType <- "difference"
plotParList$refName <- "CO"
RankPlotWithTable(tableParList = tableParList,
plotParList = plotParList, annotRefName = "Colorado",
annotRefRank = TravelTime2011$Rank[which(TravelTime2011$Abbreviation == "CO")])
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.