Skip to content

Commit

Permalink
repair -package file; fix AirCrash.Rd link
Browse files Browse the repository at this point in the history
  • Loading branch information
friendly committed Aug 20, 2023
1 parent ba7f13d commit 232bf97
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
10 changes: 5 additions & 5 deletions man/AirCrash.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Excludes small planes (less than 6 passengers) and non-commercial (cargo, milita
}
\source{
Originally from David McCandless,
\url{http://www.informationisbeautiful.net/visualizations/plane-truth-every-single-commercial-plane-crash-visualized/},
\url{https://www.informationisbeautiful.net/visualizations/plane-truth-every-single-commercial-plane-crash-visualized/},
with the data at
\url{https://docs.google.com/spreadsheets/d/1OvDq4_BtbR6nSnnHnjD5hVC3HQ-ulZPGbo0RDGbzM3Q/edit?usp=drive_web},
downloaded April 14, 2015.
Expand All @@ -39,19 +39,19 @@ aircrash.tab <- xtabs(~Phase + Cause, data=AirCrash)
mosaic(aircrash.tab, shade=TRUE)

# fix label overlap
mosaic(aircrash.tab, shade=TRUE,
mosaic(aircrash.tab, shade=TRUE,
labeling_args=list(rot_labels=c(30, 30, 30, 30)))

# reorder by Phase
phase.ord <- rev(c(3,4,1,2,5))
mosaic(aircrash.tab[phase.ord,], shade=TRUE,
labeling_args=list(rot_labels=c(30, 30, 30, 30)),
mosaic(aircrash.tab[phase.ord,], shade=TRUE,
labeling_args=list(rot_labels=c(30, 30, 30, 30)),
offset_varnames=0.5)

# reorder by frequency
phase.ord <- order(rowSums(aircrash.tab), decreasing=TRUE)
cause.ord <- order(colSums(aircrash.tab), decreasing=TRUE)
mosaic(aircrash.tab[phase.ord,cause.ord], shade=TRUE,
mosaic(aircrash.tab[phase.ord,cause.ord], shade=TRUE,
labeling_args=list(rot_labels=c(30, 30, 30, 30)))


Expand Down
3 changes: 1 addition & 2 deletions man/vcdExtra-package.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ In addition, I teach a course, \emph{Psy 6136: Categorical Data Analysis},
\url{https://friendly.github.io/psy6136/} using this package.
}

\details{
The main purpose of this package is to serve as a sandbox for
introducing extensions of
mosaic plots and related graphical methods
Expand Down Expand Up @@ -114,8 +115,6 @@ Turner, H. and Firth, D. \emph{Generalized nonlinear models in R: An overview of
\code{\link[gnm]{gnm-package}}, for an extended range of models for contingency tables

\code{\link[vcd]{mosaic}} for details on mosaic displays within the strucplot framework.
%~~ Optional links to other man pages, e.g. ~~
%~~ \code{\link[<pkg>:<pkg>-package]{<pkg>}} ~~
}
\examples{
example(mosaic.glm)
Expand Down

0 comments on commit 232bf97

Please sign in to comment.