Re: [R] bi-directional bar chart with a central axis

2019-09-17 Thread Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) via R-help
Oh, that's a nice option, too. Thanks! -Original Message- From: Richard M. Heiberger Sent: Tuesday, September 17, 2019 6:54 PM To: Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) Cc: r-help@r-project.org Subject: Re: [R] bi-directional bar chart with a central axis I would us

Re: [R] bi-directional bar chart with a central axis

2019-09-17 Thread Richard M. Heiberger
I would use the likert function in the HH package > library(HH) > likert(my.dta) > as.pyramidLikert(likert(my.dta)) > See the demo demo("likert-paper", package="HH", ask=FALSE) for more complex examples, including the population pyramid. We can also get the multiple coloring that your posted e

Re: [R] bi-directional bar chart with a central axis

2019-09-17 Thread Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) via R-help
irectional bar chart with a central axis Hi Jennifer, This is one way: library(plotrix) pyramid.plot(my.dta[,1],my.dta[,2], labels=c("Statement 1","Statement 2","Statement 3", "Statement 4","Statement 5","Statement 6", "Statement

Re: [R] bi-directional bar chart with a central axis

2019-09-17 Thread Jim Lemon
Hi Jennifer, This is one way: library(plotrix) pyramid.plot(my.dta[,1],my.dta[,2], labels=c("Statement 1","Statement 2","Statement 3", "Statement 4","Statement 5","Statement 6", "Statement 7","Statement 8","Statement 9", "Statement 10","Statement 11","Statement 12","Statement 13"), top.labels

Re: [R] bi-directional bar chart with a central axis

2019-09-17 Thread Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) via R-help
e plotrix link. Jen -Original Message- From: David Winsemius Sent: Tuesday, September 17, 2019 6:32 PM To: Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) ; r-help@r-project.org Subject: Re: [R] bi-directional bar chart with a central axis On 9/17/19 3:14 PM, Sabatier, Jennifer F. (CDC/DDPHSIS/

Re: [R] bi-directional bar chart with a central axis

2019-09-17 Thread David Winsemius
On 9/17/19 3:14 PM, Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) via R-help wrote: Hi R-help, I have this data: my.dta <-data.frame(matrix(c( 26.3, 21.4, 20.1, 13.4, 7.9,3.9, 16.5, 14.6, 5.3,3.6, 38.6, 25.6, 34.4, 21.6, 77.4, 79.5, 58.2, 56.1, 80.5, 84, 37.7, 31.9,

[R] bi-directional bar chart with a central axis

2019-09-17 Thread Sabatier, Jennifer F. (CDC/DDPHSIS/CGH/DGHP) via R-help
Hi R-help, I have this data: my.dta <-data.frame(matrix(c( 26.3, 21.4, 20.1, 13.4, 7.9,3.9, 16.5, 14.6, 5.3,3.6, 38.6, 25.6, 34.4, 21.6, 77.4, 79.5, 58.2, 56.1, 80.5, 84, 37.7, 31.9, 19.9, 28.1, 6.2,5.9 ), nrow=13, ncol=2, byrow=T, dimnames=list(c('A','B'