adplus-dvertising
frame-decoration

Question

What will be the output of the following R code snippet?
> lm <- function(x) { x * x }
> lm

a.

function(x) { x * x }

b.

func(x) { x * x }

c.

function(x) { x / x }

d.

function { x $ x }

Posted under R Programming

Answer: (a).function(x) { x * x }

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 snippet?

Similar Questions

Discover Related MCQs

Q. Point out the correct statement?

Q. A function, together with an environment, makes up what is called a ______ closure.

Q. Point out the wrong statement?

Q. R uses _________ scoping or static scoping.

Q. The only environment without a parent is the ________ environment.

Q. The ________ for R are the main feature that make it different from the original S language.

Q. The _________ function is a kind of “constructor function” that can be used to construct other functions.

Q. ________ functions can be “built which contain all of the necessary data for evaluating the function.

Q. Point out the wrong statement?

Q. Which of the following language supports lexical scoping?

Q. _________ require you to pass a function whose argument is a vector of parameters.

Q. Point out the correct statement?

Q. The _________ function is used to plot negative likelihood.

Q. ________ loop over a list and evaluate a function on each element.

Q. Point out the wrong statement?

Q. __________ function is same as lapply in R.

Q. Which of the following is multivariate version of lapply?

Q. Point out the correct statement?

Q. ________ applies a function over the margins of an array.

Q. _______ is used to apply a function over subsets of a vector.