How to Identify an integer(0) Data Object in R (Example Code)

In this tutorial, I’ll show how to catch an empty integer in the R programming language.

Example Data

my_integer <- integer()        # Creating example integer
my_integer                     # Showing example integer in RStudio console
# integer(0)

Example: Checking Length of Integer

length(my_integer)             # Applying length() function
# [1] 0

Leave a Reply

Your email address will not be published. Required fields are marked *

Fill out this field
Fill out this field
Please enter a valid email address.
You need to agree with the terms to proceed