Interactive() Function in R
Last Updated :
02 Jun, 2022
In this article, we are going to see interactive() Function in R Programming Language.
Interactive() Function
It returns TRUE when R is being used interactively and FALSE otherwise. This function is used to test whether R runs interactively or not.
Syntax: interactive()
It will return TRUE, if is running interactively, otherwise FALSE.
Example 1:
Check whether the environment is Running interactively or not.
Output:
TRUE
Example 2:
Check whether the environment is Running interactively or not by creating two vectors and display them
R
vec1 = c (2,3,4)
vec2 = c (2,1,2,3)
print (vec1)
print (vec2)
interactive ()
|
Output:
[1] 2 3 4
[1] 2 1 2 3
[1] TRUE
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...