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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:49:51+00:00 2026-06-10T21:49:51+00:00

I received the error Error in if (condition) { : argument is of length

  • 0

I received the error

Error in if (condition) { : argument is of length zero

or

Error in while (condition) { : argument is of length zero

What causes this error message, and what does it mean?

On further inspection it seems that the value is NULL.

condition
## NULL

In order to deal with this error, how do I test for NULL values?

I expected that this would return TRUE, but I got an empty logical value:

condition == NULL
## logical(0)
  • 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-10T21:49:53+00:00Added an answer on June 10, 2026 at 9:49 pm

    See ?NULL

    You have to use is.null

    ‘is.null’ returns ‘TRUE’ if its argument is ‘NULL’ and ‘FALSE’
    otherwise.

    Try this:

    if ( is.null(hic.data[[z]]) ) { print("is null")}
    

    From section 2.1.6 of the R Language Definition

    There is a special object called NULL. It is used whenever there is a need to indicate or
    specify that an object is absent. It should not be confused with a vector or list of zero
    length.
    The NULL object has no type and no modifiable properties. There is only one NULL object
    in R, to which all instances refer. To test for NULL use is.null. You cannot set attributes
    on NULL.

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

Sidebar

Related Questions

I just received an error a while ago from this code: private void ShowXMLDatatoRTB()
I received this error on following code.Is this + sign is not available in
I received the error while trying to display some variable like so: echo id
I received >>> THIS <<< error log from a client. I replaced the app
When I tried to open my SharePoint extended site, I received error 500. The
String s = new String({'h','e','l','l','o'}); I received the error: 1 Invalid expression term '{'
Received a strange error when using secure websockets in Safari with Webbit server. Error
I received the following error when I tried to run a C# WinForms application
Within my ajax call if an error is received I have an alert :
I am trying to initialize NSDictionary but it gives me following error: Program received

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.