Check if an Object of the Specified Name is Defined or not in R Programming – exists() Function
exists() function in R Language is used to check if an object with the names specified in the argument of the function is defined or not. It returns TRUE if the Object is found.
name: Name of the Object to be searched
 TRUE  TRUE  FALSE
In the above examples, it can be seen that when there was no object named “Hello” defined in the first code, the
exists() function returned FALSE, whereas after the declaration of the “Hello” Object, the
exists() function returned TRUE. This means that the
exists() function checks for pre-defined and user-defined, both objects.