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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:52:05+00:00 2026-05-25T11:52:05+00:00

I am using package qvalue which has the following pre-processing step if(min(p)<0 || max(p)>1)

  • 0

I am using package qvalue which has the following pre-processing step

 if(min(p)<0 || max(p)>1) {
    print("ERROR: p-values not in valid range"); return(0)
    }
    if(length(lambda)>1 && length(lambda)<4) {
    print("ERROR: If length of lambda greater than 1, you need at least 4 values."); return(0)
    }
    m <- length(p)

I have 6000 values like the following: I could show them due to character limit of the overflow

[1] 0.3671178710 0.9360140780 0.2428194940 0.5185496048 0.3280692392
   [6] 0.4681617243 0.3654880576 0.3121728291 0.6357866236 0.2576397417
  [11] 0.7224965457 0.4020649535 0.1359902232 0.4313780172 0.7543924642
  [16] 0.1915732183 0.4359938726 0.2705147307 0.5155629834 0.4446611542
  [21] 0.6636414268 0.4666097886 0.5121170670 0.7911474854 0.0662147755
  [26] 0.8659648750 0.0307181717 0.0910574293 0.7331402271 0.3078877515
  [31] 0.8331673742 0.4992904913 0.0773711040 0.6134791426 0.6714738843
  [36] 0.6620106441 0.3944466498 0.3330491388 0.7726571107 0.5989331217
  [41] 0.4429749257 0.7650029317 0.7608016901 0.3642432987 0.1672484189
  [46] 0.4305554981 0.4308085746 0.7999056710 0.8117493501 0.3325086551
  [51] 0.7233274303 0.4939756680 0.7763859166 0.8281922847 0.5195117763
  [56] 0.6581468025 0.7082172344 0.7201224910 0.8420571108 0.3118079731
  [5996] 0.3066819785 0.6066206806 0.7524323861 0.6815655815 0.7105895186

Whenever I fun the function for this variable:
fdrq = qvalue(as.numeric( nd[,3]), fdr.level = 0.05 )

I am getting error:

[1] "ERROR: p-values not in valid range"

I tried to see the maximum and minimum, looks like it is in range.

> max(nd[,3])
[1] 1
> min(nd[,3])
[1] 0.0001641695

Please provide suggestion on what might be wrong ! is this something special on handling of decimal numbers ….. or this is a bug …

Thanks;

  • 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-25T11:52:05+00:00Added an answer on May 25, 2026 at 11:52 am

    I suspect that you have a value that’s a tiny bit greater than 1, but that gets printed as “1”:

    > x <- 1.000000000000001
    > x
    [1] 1
    > x > 1
    [1] TRUE
    

    You can configure R to display more digits:

    > options(digits=20)
    > x
    [1] 1.000000000000001
    

    A simple workaround might be to force all values greater than 1 to exactly 1.0:

    > x <- c(1, 0.7, 1.000000000000001, 0.3, 0)
    > x
    [1] 1.000000000000000 0.700000000000000 1.000000000000001 0.300000000000000
    [5] 0.000000000000000
    > x[x>1] <- 1
    > x
    [1] 1.0 0.7 1.0 0.3 0.0
    

    Whether this workaround is a sensible thing to do in your case, I don’t know.

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

Sidebar

Related Questions

Given the following Java which is loaded into the database using loadjava: package grassie.example;
I have created an installation package using Wix which installs a Windows service on
When I send e-mails using the package UTL_SMTP I am getting this error when
I am trying to filter stop-words from the following documents using package tm .
I am executing a SQL Server 2000 DTS package using C# by following the
I am trying to create an installer using Package Maker, which installs a plugin
I installed Eclipse using Synaptic Package Manager (Ubuntu 9.10). However, my Eclipse does not
Packaging GWT project using mvn package fails and I have the following ouput: [INFO]
I'm using contrast package to construct contrasts for lm in R. With the following
Hi I am using package-maker of Mac OS to create installer package for Mac

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.