Thanks Matt,
I've been trying to get the data into a format that boxplot will accept, but
I'm having trouble.
If I read in my file directly

data <- read.table("base100.log")
plot(data)

It plots the Send data against the Receive data, using one as x, and one as
y.

That's not too surprising, so I tried to just plot the Send data

plot(data[1])

It plots all the points horizontally along the x axis, with no associated y
data.  This is very similar to what I would like to do - associate all 100
points with a y co-ordinate.

I couldn't get this step to work though, I tried a number of things

ydata <- seq(length=100, from=1, by=0)
p1 <- c(data[1], ydata)

seems to be the close to what I want, but it isn't quite right.  Can anyone
give me an idea how to associate the 100 data points with a y-coord, so that
I can then use them in a boxplot/whiskerplot?

Thanks
ian

On 5 July 2010 12:31, Matt Shotwell <shotw...@musc.edu> wrote:

> It looks like read.table is reading the first line as a data value,
> which is the default for read.table. Try using read.table with the
> argument header=TRUE. Also, consider using a box and whiskers plot for
> these data (?boxplot, ?lattice::bwplot).
>
> -Matt
>
> On Mon, 2010-07-05 at 12:08 -0400, Ian Bentley wrote:
> > Hello!
> >
> > I need to make a plot with whispers that does the following.
> >
> > Reads in 50 files, each file containing 200 data points.  A file looks
> like
> > this:
> > base100.log
> > Send Receive
> > 10.5   100.3
> > 15.0   102.4
> > ...
> >
> > There are 100 lines, each with two data points.  I need to read in the 50
> > files, and plot three lines
> >
> > The first line is the mean of the send column with whiskers indicating
> > standard deviation  (Each file represents one data point)
> >
> > The second line is the mean of the receive column, as above.
> >
> > the final plot is the mean of the two summed, with whiskers as above.
> >
> > There will be 50 data points on the final graph, one for each file.
> >
> > I've done this sort of a thing before, but I really can't figure out how
> to
> > handle the different Columns.
> >
> > If I use read.table:
> >
> > x1 <- read.table("updateToSink1010.log")
> >
> > then x1 becomes a matrix, with two columns and 101 rows.  -- including
> Send,
> > Receive.
> >
> > Anyways, I'd appreciate a push in some direction - hopefully the right
> one
> > :).
> >
> --
> Matthew S. Shotwell
> Graduate Student
> Division of Biostatistics and Epidemiology
> Medical University of South Carolina
> http://biostatmatt.com
>
>


-- 
Ian Bentley
M.Sc. Candidate
Queen's University
Kingston, Ontario

        [[alternative HTML version deleted]]

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

Reply via email to