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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T02:11:58+00:00 2026-05-24T02:11:58+00:00

The results from a chisq test appears as below , i need the sum

  • 0

The results from a chisq test appears as below , i need the sum of statistic (chisq) only, colsum is not working. How will i only get the statistic sum?

    statistic parameter p.value      
1   120       9         1.336165e-21
2   115.2397  21        5.292644e-15
3   114.9731  18        3.703771e-16
4   85.85785  21        8.283122e-10
5   103.7818  30        4.650999e-10
6   85.44727  24        8.062478e-09
7   42.03636  18        0.001093033 
8   42.31688  24        0.01188941  
9   72.22857  24        1.000100e-06
10  54.47273  24        0.0003685193
  • 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-24T02:11:59+00:00Added an answer on May 24, 2026 at 2:11 am

    You want something along the lines of:

    sum(object_name[ , 1])  # should work for matrix or dataframe
    

    If it’s a data.frame you could have written:

     sum(object_name$statistic)
    

    Sometimes an object has a matrix buried “one layer below” or even “two layers below” where it should be. Perhaps this dput result could be used … not saying it is like yours but it does have a list class and it would print something like yours:

        object_name <-list(list(structure(c(1, 120, 9, 1.336165e-21, 2, 115.2397, 21, 
    5.292644e-15, 3, 114.9731, 18, 3.703771e-16, 4, 85.85785, 21, 
    8.283122e-10, 5, 103.7818, 30, 4.650999e-10, 6, 85.44727, 24, 
    8.062478e-09, 7, 42.03636, 18, 0.001093033, 8, 42.31688, 24, 
    0.01188941, 9, 72.22857, 24, 1.0001e-06, 10, 54.47273, 24, 0.0003685193
    ), .Dim = c(10L, 4L), .Dimnames = list(NULL, c("rown", "statistic", 
    "parameter", "p.value")))))
    
    > str(object_name)
    List of 1
     $ :List of 1
      ..$ : num [1:10, 1:4] 1.00 1.20e+02 9.00 1.34e-21 2.00 ...
      .. ..- attr(*, "dimnames")=List of 2
      .. .. ..$ : NULL
      .. .. ..$ : chr [1:4] "rown" "statistic" "parameter" "p.value"
    

    You need to use [[1]] twice to get “deep enough” to access the “statistic” column:

    object_name[[1]][[1]][ , "statistic"] 
    sum( object_name[[ 1 ]][[1]][, "statistic"] )
    #[1] 267.6397 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm getting weird results from the System.out.print immediately below the Scanner declaration in the
I currently use a DataTable to get results from a database which I can
Can someone explain why I get different results from these two statements? I thought
I'm getting results from left shift to which I could not find an explanation.
I have this results from a speed test I wrote in Java: Java real
I need to display results from a SQL join in a ListView/ListActivity. I've created
I want to merge results from two different tables, the only thing they have
The issue is the results from local host are not matching up with the
Can you get results from chome.bookmark.search without having to display them? Update (Answer): Ok.
I'm storing results from a quiz in a table, and I need to find

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.