Dear R users,

I have one excel file with 5 sheets. The no. of columns vary for each
sheet. The 1st sheet consists of 38 columns. So, I want to plot 38 separate
line charts and arrange them in par(mfrow = c(4, 10)) order. Please suggest
me how to do this. I have tried with the following code by running a loop
inside of a sheet, but it is not working. Further, I want to run loops for
each sheet.

par(mfrow = c(4, 10))
loop.vector <- 1:38
for (i in loop.vector)
x <- JJ[,i]
library(ggplot2)
  library(cowplot)
  plot.mpg <- ggplot(mpg, aes(x,
                              main = paste ("country", i),
                              xlab = "Scores",
                              xlim = c(1,500)
                              y = colnames[i,], colour = factor(cyl))) +
  geom_line(size=2.5)
save_plot("mpg.png", plot.mpg,
          base_aspect_ratio = 1.3)

I want to give my X axis name as scores of (1,500) and Y axis as the
particular column names for all graphs.

Please suggest.

Thanks in advance.

-- 
*Best Regards,*
*Subhamitra Patra*
*Phd. Research Scholar*
*Department of Humanities and Social Sciences*
*Indian Institute of Technology, Kharagpur*
*INDIA*








[image: Mailtrack]
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&;>
Sender
notified by
Mailtrack
<https://mailtrack.io?utm_source=gmail&utm_medium=signature&utm_campaign=signaturevirality5&;>
11/20/18,
11:49:42 PM

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org 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.

Reply via email to