in R Language by
Q:

What will be the output of the below code -

printmessage <- function (a) {

                  if (is.na (a))

                             print ("a is a missing value!")

                     else if (a < 0)

                             print ("a is less than zero")

                     else

                            print ("a is greater than or equal to zero")

                    invisible (a)

 }

printmessage (NA)

▼ Show 1 Answer

0 votes
by
The output for the above R programming code will be “a is a missing value.” The function is.na () is used to check if the input passed is a missing value.
Learn More with Madanswer

Related questions

+2 votes
asked Jul 28, 2019 in R Language by Aarav2017
...