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 3979600
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T05:11:23+00:00 2026-05-20T05:11:23+00:00

I want to do something incredible simple: I want to create one boxplot for

  • 0

I want to do something incredible simple: I want to create one boxplot for an complete dataframe. Yet, searching for ‘combined boxplot’ and related terms didn’t turn up any suggestions. If I overlooked an obvious way, let me know.

I have the following data:

> theData
     X20.7    X21.7    X22.7    X23.7    X24.7    X25.7    X26.7    X27.7    X28.7    X29.7    X30.7    X31.7    X32.7    X33.7    X34.7    X35.7
1 99.64920 99.49319 99.49319 99.49319 99.49319 99.49319 99.80837 99.29348 99.29348 99.29348 99.29348 99.29348 99.29348 99.46376 99.46376 99.51554
2 98.76469 98.60867 98.60867 98.60867 98.60867 98.60867 99.41553 98.40896 98.40896 98.40896 98.40896 98.40896 98.40896 98.74975 98.74975 98.54527
3 98.37824 98.22222 98.22222 98.22222 98.22222 98.22222 98.70900 98.13767 98.13767 98.13767 98.13767 98.13767 98.13767 98.47846 98.47846 98.01791
4 98.11356 97.95754 97.95754 97.95754 97.95754 97.95754 97.82447 97.93003 97.93003 97.93003 97.93003 97.93003 97.93003 98.27083 98.27083 97.81027
5 97.80027 97.64424 97.64424 97.64424 97.64424 97.48632 97.43801 97.40158 97.40158 97.40158 97.40158 97.40158 97.40158 97.74239 97.74239 97.28181
6 97.47825 97.32222 97.32222 97.32222 97.43795 97.12131 97.17333 97.03658 97.10158 97.10158 97.10158 97.10158 97.10158 97.44239 97.44239 96.98180
> dput(theData)
structure(list(X20.7 = c(99.6492, 98.7646913866934, 98.3782376564915, 
98.1135635544627, 97.8002672890352, 97.4782549804011), X21.7 = c(99.4931928571429, 
98.6086741582754, 98.2222160140822, 97.9575388921788, 97.6442390541023, 
97.3222230681959), X22.7 = c(99.4931928571429, 98.6086741582754, 
98.2222160140822, 97.9575388921788, 97.6442390541023, 97.3222230681959
), X23.7 = c(99.4931928571429, 98.6086741582754, 98.2222160140822, 
97.9575388921788, 97.6442390541023, 97.3222230681959), X24.7 = c(99.4931928571429, 
98.6086741582754, 98.2222160140822, 97.9575388921788, 97.6442390541023, 
97.437947563131), X25.7 = c(99.4931928571429, 98.6086741582754, 
98.2222160140822, 97.9575388921788, 97.4863155584865, 97.121313307238
), X26.7 = c(99.8083714285714, 99.415530164398, 98.7090041774867, 
97.8244717838903, 97.4380076185552, 97.173326388931), X27.7 = c(99.2934828571429, 
98.4089615689001, 98.1376722694449, 97.9300324124538, 97.401583100132, 
97.03657716757), X28.7 = c(99.2934828571429, 98.4089615689001, 
98.1376722694449, 97.9300324124538, 97.401583100132, 97.1015782240536
), X29.7 = c(99.2934828571429, 98.4089615689001, 98.1376722694449, 
97.9300324124538, 97.401583100132, 97.1015782240536), X30.7 = c(99.2934828571429, 
98.4089615689001, 98.1376722694449, 97.9300324124538, 97.401583100132, 
97.1015782240536), X31.7 = c(99.2934828571429, 98.4089615689001, 
98.1376722694449, 97.9300324124538, 97.401583100132, 97.1015782240536
), X32.7 = c(99.2934828571429, 98.4089615689001, 98.1376722694449, 
97.9300324124538, 97.401583100132, 97.1015782240536), X33.7 = c(99.4637585714286, 
98.7497473555799, 98.478463763926, 98.2708282766442, 97.7423900760775, 
97.4423915096353), X34.7 = c(99.4637585714286, 98.7497473555799, 
98.478463763926, 98.2708282766442, 97.7423900760775, 97.4423915096353
), X35.7 = c(99.5155421428571, 98.5452656069643, 98.0179127183643, 
97.81026932055, 97.2818110000344, 96.9818010094329)), .Names = c("X20.7", 
"X21.7", "X22.7", "X23.7", "X24.7", "X25.7", "X26.7", "X27.7", 
"X28.7", "X29.7", "X30.7", "X31.7", "X32.7", "X33.7", "X34.7", 
"X35.7"), row.names = c(NA, 6L), class = "data.frame")

I want all this data summarized in one boxplot, yet, when I try to plot an boxplot (i.e. boxplot(theData)) R automatically makes groups based on the column names.

I also tried to put the complete data frame in an vector, however, because my (complete) data set also contains NA values, I didn’t succeed in this. So far, I have the following function to try to make an vector of the dataframe so that this can be plotted in a boxplot:

for(i in 1:ncol(allTheData)) {
        tmpData <- allTheData[,i]
        for(j in 1:length(tmpData)){
            if(!is.na(j)){
                tmpVector <- c(tmpVector, j)
            }
        }
    }

However, I think I’m overcomplicating this problem, and I’m doubtful if such an loop construction will benefit the performance of R.

So, how can I make an boxplot which consists of one boxplot for an complete data frame? So, that I don’t get an boxplot which consists of X20.7 through X35.7, but gives one “Overall” boxplot?

  • 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-20T05:11:24+00:00Added an answer on May 20, 2026 at 5:11 am

    Try something like this

    boxplot(unlist(theData))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want something really simple to identify one word ( UNO ! )
I want something simple in order to experiment/hack. I've created a lot interpreters/compilers for
I want something like sys.builtin_module_names except for the standard library. Other things that didn't
I'm searching for a set container in C++. I want something where I could
I want something like an std::map , but I only want to see if
I want something that can check if a string is SELECT , INSERT ,
i want something like this the user enter a website link i need check
I want something similar to the following pseudocode: myGridView.SelectedIndex = myGridView.DataKeys.IndexOf(mySpecificKey); I've done some
I want something like this: <msxsl:script language=C#> ??? getNodes() { ... return ... }
By default, cocoa progress bars are slightly fat and I want something a little

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.