Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7049563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T03:01:57+00:00 2026-05-28T03:01:57+00:00

I’m successfully using the boxplot function to generate… boxplots. Now I need to generate

  • 0

I’m successfully using the boxplot function to generate… boxplots. Now I need to generate tables containing the stats that boxplot calculates in order to create plots.

I do this by using the plot=FALSE option.

The problem is that this produces data in a rather bizarre format that I simply can’t do anything with. Here’s an example:

structure(list(stats = structure(c(178.998262143545, 182.227431564442, 
202.108456373209, 220.375358994654, 221.990406228232, 216.59986775699, 
217.054997032148, 228.509462713206, 267.070720949859, 284.832378859975, 
189.864120937198, 201.876421960518, 219.525439081472, 234.260088973545, 
279.343359793024, 209.472617639903, 209.526516071858, 214.785213079737, 
230.027361556731, 240.0647114578, 202.057148813419, 207.375619207685, 
220.093663781351, 226.246698737471, 240.343646265795), .Dim = c(5L, 
5L)), n = c(4, 6, 8, 4, 8), conf = structure(c(171.971593703341, 
232.245319043076, 196.247705331772, 260.771220094641, 201.435457751239, 
237.615420411705, 198.589545146688, 230.980881012787, 209.552007821332, 
230.635319741371), .Dim = c(2L, 5L)), out = numeric(0), group = numeric(0), 
names = c("U", "UM", "M", "LM", "L")), .Names = c("stats", "n", "conf", "out", "group", 
"names"))

What I want is a table for each of the stats — min, max, median and the quartiles — and their values for each group (the ones in “names”).

Could somebody give me a hand with this? I’m very much an R beginner.

Thanks in advance!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T03:01:58+00:00Added an answer on May 28, 2026 at 3:01 am

    boxplot returns a structure in R called a list.

    A list is more-or-less a data container where you can refer to elements by name.
    If you do A <- boxplot(...), you can access the names with A$names, the conf with A$conf, etc.

    So, looking at the boxplot helpfile ?boxplot under Value: (which tells you what boxplot returns), we see that it returns a list with the following components:

       stats: a matrix, each column contains the extreme of the lower
              whisker, the lower hinge, the median, the upper hinge and the
              extreme of the upper whisker for one group/plot.  If all the
              inputs have the same class attribute, so will this component.
           n: a vector with the number of observations in each group.    
        conf: a matrix where each column contains the lower and upper
              extremes of the notch.    
         out: the values of any data points which lie beyond the extremes
              of the whiskers.    
       group: a vector of the same length as ‘out’ whose elements indicate
              to which group the outlier belongs.    
       names: a vector of names for the groups.
    

    So the table for each of the stats is in A$stats, each column belongs to a group and contains the min, lower quartile, median, upper quartile, and max.

    You could do:

    A <- boxplot(...)
    mytable <- A$stats
    colnames(mytable)<-A$names
    rownames(mytable)<-c('min','lower quartile','median','upper quartile','max')
    mytable 
    

    which returns (for mytable):

                          U       UM        M       LM        L
    min            178.9983 216.5999 189.8641 209.4726 202.0571
    lower quartile 182.2274 217.0550 201.8764 209.5265 207.3756
    median         202.1085 228.5095 219.5254 214.7852 220.0937
    upper quartile 220.3754 267.0707 234.2601 230.0274 226.2467
    max            221.9904 284.8324 279.3434 240.0647 240.3436
    

    Then you can refer to it like mytable['min','U'].

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need a function that will clean a strings' special characters. I do NOT
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a jquery bug and I've been looking for hours now, I can't
this is what i have right now Drawing an RSS feed into the php,
I've got a string that has curly quotes in it. I'd like to replace
I am reading a book about Javascript and jQuery and using one of the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.