[R] [External] Rising and falling bar-plots simultaneously

Richard M. Heiberger rmh @end|ng |rom temp|e@edu
Mon Oct 18 04:41:22 CEST 2021


This does what I think you are asking for.

If this isn't what you are looking for, please draw by brute force what you want
for just the first 6 rows and post the R code.  Or draw by hand for just the first 6 rows and post a png.

## install.packages("HH") ## if you don't already have HH
library(HH)

tmp <- cbind(BAS1[,2], 0, BAS1[,1], 0)
tmp[c(3,102), c(2:1, 4:3)] <- tmp[c(3,102),]
likert(tmp, horizontal=FALSE, col=c("red","green","red","green"), scales=list(x=list(rot=90, cex=.4)))


> On Oct 17, 2021, at 21:14, Eliza Botto <eliza_botto using outlook.com> wrote:
> 
>> BAS1)
> 
> structure(c(3, 4, 2, 3, 3, 4, 3, 3, 3, 3, 2, 3, 3, 4, 3, 2, 2,
> 3, 2, 3, 3, 3, 4, 5, 3, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 4, 3, 3,
> 3, 4, 3, 3, 4, 5, 4, 4, 4, 3, 4, 3, 3, 3, 3, 4, 4, 5, 4, 3, 4,
> 4, 2, 3, 3, 3, 2, 4, 4, 3, 3, 4, 3, 3, 3, 3, 4, 4, 3, 3, 2, 3,
> 3, 3, 3, 2, 5, 2, 4, 3, 2, 3, 4, 3, 4, 4, 3, 4, 4, 3, 3, 3, 2,
> 3, 4, 3, 4, 4, 3, 3, 3, 3, 5, 3, 3, 5, 3, 4, 2, 3, 3, 3, 3, 3,
> 4, 3, 3.93, 3.509, 2.464, 2.72, 2.304, 3.517, 3.517, 6.675, 6.597,
> 2.715, 2.849, 2.618, 3.126, 2.715, 3.931, 3.709, 3.931, 4.145,
> 6.585, 3.907, 3.132, 2.568, 3.883, 2.447, 3.517, 7.098, 3.027,
> 3.003, 7.098, 2.374, 2.065, 2.95, 3.559, 5.102, 3.907, 3.204,
> 3.207, 2.791, 2.116, 3.003, 3.003, 3.003, 6.049, 3.52, 2.241,
> 3.883, 4.145, 3.334, 3.151, 6.269, 4.04, 3.883, 2.27, 3.304,
> 2.464, 4.111, 2.728, 3.93, 3.911, 2.447, 3.202, 2.375, 2.442,
> 2.442, 2.592, 2.13, 3.122, 5.657, 6.076, 4.186, 2.115, 2.623,
> 6.076, 2.467, 2.623, 2.629, 2.517, 2.623, 2.517, 4.32, 4.045,
> 6.597, 4.079, 3.817, 3.521, 2.564, 3.071, 2.447, 3.334, 2.442,
> 2.248, 3.094, 4.045, 4.045, 2.252, 2.971, 3.727, 2.184, 2.783,
> 2.849, 3.529, 2.484, 2.184, 2.313, 2.512, 3.4, 4.096, 3.572,
> 2.663, 3.405, 5.102, 3.267, 2.987, 2.123, 3.47, 2.512, 2.783,
> 6.597, 6.435, 4.921, 3.351, 2.07, 2.07, 2.442), .Dim = c(124L,
> 2L))



More information about the R-help mailing list