How to Apply is.function & is.primitive Functions in R (2 Examples)

In this R tutorial you’ll learn how to apply the is.function & is.primitive functions.

Example 1: How to Apply the is.function() Function

is.function(var)          # Test if object is a function
# [1] TRUE

Example 2: How to Apply the is.primitive() Function

is.primitive(var)         # Test if object is a primitive function
# [1] FALSE
is.primitive(sqrt)        # Test if object is a primitive function
# [1] TRUE

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