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 |
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(var) # Test if object is a primitive function # [1] FALSE
is.primitive(sqrt) # Test if object is a primitive function # [1] TRUE |
is.primitive(sqrt) # Test if object is a primitive function # [1] TRUE