adplus-dvertising
frame-decoration

Question

What will be the output of the following R code?
x<- c (“a”,” b”)
       as.numeric(x)

a.

[1] 1 2

b.

[1] TRUE TRUE

c.

[1] NA NA (Warning message: NAs introduced by coercion)

d.

[1] NAN

Posted under R Programming

Answer: (c).[1] NA NA (Warning message: NAs introduced by coercion)

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. How do you create an integer suppose 5 in R?

Q. Which one of the following is not a basic datatype?

Q. How can we define ‘infinity’ in R language?

Q. What is NaN called?

Q. How can we define ‘undefined value’ in R language?

Q. A list is represented as a vector but can contain objects of ___________

Q. In R language, a vector is defined that it can only contain objects of the ________

Q. Which of the following operator is used to create integer sequences?

Q. Which of the following is used for Statistical analysis in R language?

Q. Advanced users can write ___ code to manipulate R objects directly.

Q. What is the output of getOption(“defaultPackages”) in R studio?

Q. Which of the following is “Recommended” package in R?

Q. Which of the following is a base package for R language?

Q. Point out the wrong statement?

Q. Which Package contains most fundamental functions to run R?

Q. R functionality is divided into a number of ________

Q. Point out the wrong statement?

Q. They primary R system is available from the ______

Q. Which of the following command is used to print an object “x” in R?

Q. At higher level one “limitation” of R is that its functionality is based on __________