Hi:

I'll use some fake data to show you how to get the plots. To get the data
from Excel into
R, there are several ways to do it: converting the Excel file into csv and
using read.csv() in
R is one method and the XLSReadWrite package is another. Here's a link from
the R Wiki:
http://rwiki.sciviews.org/doku.php?id=tips:data-io:ms_windows&s=read%20excel

It sounds like what you want is a plot of the 95th percentiles of the
latency by
transaction rate for each transaction type. Here are a couple of ways to do
that using
some fake data.

df <- data.frame(rate = rep(seq(10, 50, by = 10), each = 12),
         type = rep(rep(c('Order', 'ACK', 'FILL'), each = 4), 5),
         latency = rpois(60, 3))
library(ggplot2)
library(lattice)

# get 95th percentiles
# Several ways to do this; I'll use ddply() from the plyr package (which
loads with ggplot2)
latq95 <- ddply(df, .(rate, type), summarise, lq95 = quantile(latency,
0.95))

# ggplot2 way to get the graph:
p <- ggplot(latq95, aes(x = rate, y = lq95, shape = type))
p + geom_point(size = 2) + geom_line() +
      xlab('Transaction rate') + ylab('95th percentile')

# lattice method of getting the graph:
xyplot(lq95 ~ rate, data = latq95, groups = type, type = c('p', 'l'),
   xlab = 'Transaction rate', ylab = '95th percentile',
   auto.key = list(text = levels(latq95$type), space = 'right',
                          points = FALSE, lines = TRUE))

Hope this is what you were after...

Dennis


On Mon, Apr 5, 2010 at 1:55 PM, jeff d <jdavid...@forwardthinkgroup.com>wrote:

>
> Hi,
>
>  I'd like to move from excel to R because our dataset are so large. Here's
> what my data looks like:
>
> Transaction Rate   Run#       Transaction Type        Location    Latency
> in
> Seconds
>                   10        1                       Order
> A                            0
>                   10        1                       Order
> B                            3
>                   10        1                       Order
> C                            1
>                   10        1                       Order
> D                            2
>                   10        1                       ACK
> A                            0
>                   10        1                       ACK
> B                            5
>                   10        1                       ACK
> C                            2
>                   10        1                       ACK
> D                            2
>                   10        1                       FILL
> A                            0
>                   10        1                       FILL
> B                            2
>                   10        1                       FILL
> C                            3
>                   10        1                       FILL
> D                            2
>
> - we have about 1000 runs per transaction rate (run# 1..1000)
> - we have 50 transaction rates (transaction rate 10..500 incrementing by
> 10)
>
> We'd like to be able to create a graph where:
> - Y axis = 95 pecentile latency of transaction type data (order, ack, fill)
> - X axis = transaction rate
>
> I've read the basic doc, created some simple plots, could someone get me
> going in the right direction?
>
> tia,
> jd
>
>
>
> --
> View this message in context:
> http://n4.nabble.com/new-to-R-analysis-of-latency-data-tp1752096p1752096.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>

        [[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