Question
> printmessage <- function(x) {
+ if(x > 0)
+ print("x is greater than zero")
+ else
+ print("x is less than or equal to zero")
+ invisible(x)
+ }
> printmessage(NA)
a.
Error
b.
Warning
c.
Messages
d.
Null
Posted under R Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What will be the output of the following R code?
Similar Questions
Discover Related MCQs
Q. To get the current date, the _______ function will return a Date object which can be converted to a different class if necessary.
View solution
Q. Point out the correct statement?
View solution
Q. Warnings are generated by the _________ function.
View solution
Q. Point out the correct statement?
View solution
Q. _________ is an indication that a fatal problem has occurred and execution of the function stops.
View solution
Q. A programmer builds a _________ to avoid repeating the same task or reduce complexity.
View solution
Q. The cumulative frequency distribution of a categorical variable can be checked using the ________ function in R language.
View solution
Q. Which function calculates the count of each category of a categorical variable?
View solution
Q. Which function basically finds the intersection between two different sets of data?
View solution
Q. _________ package provides basic functionalities in R environment like arithmetic calculations, input/output.
View solution
Q. Write a function to extract the first name in the string “Mrs. Jake Luther”?
View solution
Q. ________ function generates “n” normal random numbers based on the mean and standard deviation arguments passed to the function.
View solution
Q. What will be the output of runif()?
View solution
Q. Write the syntax to set the path of the current working directory in R environment?
View solution
Q. Which function is used to create a histogram for visualisation in R programming language?
View solution
Q. Which function helps you perform sorting in R language?
View solution
Q. The current user defined objects like lists, vectors, etc. is referred to as __________ in the R language.
View solution
Q. A ________________ in R programming language can also contain numeric and alphabets along with special characters like dot and underline.
View solution
Q. ___________ function gives an error message if the desired package cannot be loaded.
View solution
Q. ________ function is usually used inside another function and throws a warning whenever a particular package is not found.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond R Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!