[R] construct boxplots from data with varying column widths

Rory Campbell-Lange rory at campbell-lange.net
Sat Jul 16 17:19:32 CEST 2011


I'm an R beginner, and I would like to construct a set of boxplots
showing database function runtimes. 

The data I have is currently is in the following format:

    function1,12.5,13.11,35.2,11.1.....n 
    function2,21.5,42.22,17.3,14.2....................n 
    ...

this is the function name followed by somewhere between 1 and 10,000
runtimes for each function. The number of runtimes is in milliseconds.

I can easily reformat the base data to provide it to R in a format such
as:

    function1,12.5
    function1,13.11
    function1,35.2
    ...

There are about 120 individual functions. I wish to show the top 20
functions by average runtime (ideally sorted by average runtime
descending). Using a boxplot will help show the variation in runtime for
each function.

I don't know how to read this data into R so that I can construct the
boxplots. I'd be also grateful for advice on how to filter the output of
the boxplot to show only the top 20.

Rory



More information about the R-help mailing list