How to make bwplot of different vector lengths


Garf

Hi, I'm trying to make a bwplot (must be a bwplot from Lattice) to represent the lengths of different vectors.

xx1 <- rnorm(20, mean = 3, sd = 3.6) #20
xx2 <- rpois(40, lambda = 3.5)
xx3 <- rchisq(31, df = 5, ncp = 0) #31
Mark in the box

This will be easier to implement once you create one with data.framethree groups :

library(lattice)
df <- data.frame(x=c(xx1, xx2, xx3), group=factor(c(rep("xx1", length(xx1)), rep("xx2", length(xx2)), rep("xx3", length(xx3)))))
bwplot(x~group, df)

enter image description here

Related


How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to make the midline thicker in bwplot?

username The following code is a minimal example for latticegenerating a boxplot (representing some values of mini ..) . But the median lines on these boxplots are a) colored and b) very thin. How to make them black and tick? a71<-structure(list(n = structure(

How to combine two dataframes with different vector lengths in R

cptn I have two data.frames that I want to merge. The first data.frame looks like this: date1 <- c("2012-01-01","2012-01-02","2012-01-03","2012-01-04","2012-01-05","2012-01-01","2012-01-02","2012-01-03","2012-01-04","2012-01-05") company1 <- c("A","A","A","A",

Combining vector matrices of different lengths together in R

username I have two vectors a and b. They are both very long 10. Then I combine them together c. There is another vector dwhose length is 20. I get an error when trying to combine them. I was wondering if there was any structure that would allow me to combine

Green with colorRampPalette outputs different vector lengths in R

Rodrigo I'm having trouble assigning a specific color to a numeric vector. My interest is to use VAR1.colorin as ColSidecolorsin heatmap.2. My dataframe has 1655 rows with no missing values. The maximum value of the colorRampPalette vector I generate is VAR1,