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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:05:37+00:00 2026-06-09T21:05:37+00:00

Whenever I compute quartiles with the quantile function in R for a vector whose

  • 0

Whenever I compute quartiles with the quantile function in R for a vector whose size is equal to certain odd numbers (every number with the tens and units slot being greater than or equal to 15), I always get the third quarter with the smallest number of elements.

Examples

 > t <- runif(n=15,min=1,max=19999)
 > t.s <- cut(t, breaks=quantile(t,probs=seq(0,1,by=0.25)), include.lowest=T)
 > summary(t.s)
 [983,5.27e+03] (5.27e+03,9.63e+03] (9.63e+03,1.46e+04] (1.46e+04,1.88e+04] 
              4                   4                   3                   4 

 > t <- sample.int(1000,111)
 > t.s <- cut(t, breaks=quantile(t,probs=seq(0,1,by=0.25)), include.lowest=T)
 > summary(t.s)
 [7,264] (264,575] (575,787] (787,999] 
   28        28        27        28 

Is this a feature of R or something to do with number theory?

  • 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-06-09T21:05:39+00:00Added an answer on June 9, 2026 at 9:05 pm

    There are 9 quantile algorithms to choose from. By default R uses type 7. Described in ?quantile. As noted if you choose other algorithms you will get other default behaviour.
    The Algorithms used are also outlined in the ?quantile

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

Sidebar

Related Questions

Recently I wrote a function to generate certain sequences with nontrivial constraints. The problem
In C++, whenever a function creates many (hundreds or thousands of) values, I used
Since I've been studying Computer Science, whenever random numbers come up, it's always Mersenne
Whenever I try installing anything using gem, I get this error - murtaza@murtaza-dev:~$ sudo
Whenever I click the button 1 , the application crashes(force closes). I am not
Whenever I close XCode, the User Info entries that I set for attributes in
Whenever I load a solution in Visual Studio with a specific project set as
Whenever a model is created in my application, an email is sent out to
Whenever I try to edit existing or create new distribution provisioning profile on iOS
Whenever the activity that initiates the scan happens, the android application force closes. It

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.