in R Language by

What will be the output of the below code -

printmessage <- function (a) {

                  if ( (a))

                             print ("a is a missing value!")

                     else if (a < 0)

                             print ("a is less than zero")


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

                    invisible (a)


printmessage (NA)

▼ Show 1 Answer

0 votes
The output for the above R programming code will be “a is a missing value.” The function () 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