Suppress Output of Command in R
Last Updated :
31 Aug, 2021
In this article, we are going to discuss how to suppress the output of a command in R programming language.
Suppressing means making the output invisible. We can make the output should not appear. By using invisible() function we can suppress the output.
Syntax:
invisible(variable_name)
Where variable_name is the name of the created variable
Example: R program to create a variable and make suppress
R
a= "hello geeks"
invisible (a)
|
Example: R program to create a vector, list, and dataframe and suppress the output
R
a= c ( "c" , "c++" , "java" )
invisible (a)
b= data.frame ( "c" , "c++" , "java" )
invisible (b)
c= list ( "c" , "c++" , "java" )
invisible (c)
|
For both the examples, no output will be generated, since the entire aim of this article is to suppress output.
Share your thoughts in the comments
Please Login to comment...