> On 21 Aug 2017, at 09:30, Venkateswara Reddy Marella (Infosys Ltd) via R-help
> <[email protected]> wrote:
>
> Hi Team ,
>
> I have a requirement of building set of panels in which each panel has
> multiple visuals based on single set of dataset values and this thing is
> repeated for other set of values as well.
> For this requirement , I am trying to use a for loop to create visuals and
> panel for each set of values ( like first panel should be for first set of
> dataset values and so on) . Do we have any available solution for this
> problem.
>
> Thanks,
> Venkat.
I suspect you want to plot categorical variables in panels. Run the code below
and see if it solves your problem. If not, create a minimal example as below
and ask your question again.
df <- data.frame(set = factor(paste0("set", rep(1:6, each = 20))),
x = rnorm(120), y = rnorm(120))
library(lattice)
xyplot(x~y|set, df, type = "p", as.table = TRUE)
library(ggplot2)
ggplot(df, aes(x = x, y = y, color = set)) +
facet_wrap(~set, nrow = 2, ncol = 3) +
geom_point()
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.