[R] Question on ploting multiple series on the same plot

jim holtman jholtman at gmail.com
Mon Jan 31 04:34:43 CET 2011

What you are proposing is a reasonable way of reading all the files
into a list object were each element is a separate file.  You can then
iterate through the list to determine the range for the plot.  If the
data is of different lenghts, then what are you plotting against?  Is
it just a single variable that you are plotting as a sequence, or is
there a set of X/Y values?  You can use xlim/ylim to setup the initial

On Sun, Jan 30, 2011 at 8:21 PM, Shashank Khanvilkar <kaavla at gmail.com> wrote:
> Thanks in advance for all help ,
> I just started using R and have already done the following.
> 1. Read through multiple files to get input data
> 2. plot a vector (X say)
> 3. end
> Now i want to plot the vector X for different files on the same plot, and I
> don't know how to do that.
> One option I considered was to have a global data frame that holds X for
> each file.
> and then plot after iterating  through the files.
> However I found that X has different lengths for different input files.
> Is there a cleaner way to do this
> Shank
>        [[alternative HTML version deleted]]
> ______________________________________________
> R-help at r-project.org mailing list
> 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.

Jim Holtman
Data Munger Guru

What is the problem that you are trying to solve?

More information about the R-help mailing list