Re: [R] How to convert category (or range/group) into continuous ?

2022-01-17 Thread peter dalgaard
Depends on what was meant. If you just want the interval midpoints for plotting, you can do something like endp <- c(0,.01, .025, .05, ... 2.5) # some manual assembly required here mid <- (head(endp, -1) + tail(endp, -1))/2 groupmid <- mid[group] plot(groupmid, VALUE) -pd > On 17 Jan 2022, at

Re: [R] how to plot numeric variable against several categories with lattice bwplot?

2022-01-17 Thread Deepayan Sarkar
On Mon, Jan 17, 2022 at 7:01 PM PIKAL Petr wrote: > > Hi Luigi > > Not sure how to do it in lattice but in ggplot you could use for cycle > > for(i in 3:5) { > print(ggplot(df, aes(x=df[,i], y=y))+geom_boxplot()+ xlab(names(df)[i])) > } > > It is better to put plots to pdf file Pretty much the

Re: [R] how to plot numeric variable against several categories with lattice bwplot?

2022-01-17 Thread Luigi Marongiu
Yes, I would like to have a boxplot of y against each of the other variables, each into a separate panel, without having to type the command for each pair (I have 23 categories in the real data...). Thank you for the solid line code (I thought it might have been a simple parameter to add...) On