1

What will be the output of the following R code? function(p) { params[!fixed] <- p mu <- params[1] sigma <- params[2] ## Calculate the Normal density a <- -0.5*length(data)*log(2*pi*sigma^2) b <- -0.5*sum((data-mu)^2) / (sigma^2) -(a + b) } > ls(environment(nLL))

Correct Answer: "data" "fixed" "params"

Make the most of this question

This page focuses on one R Programming MCQs question from Programming. After checking the answer, return to the topic list to practice more or run a timed set.

R Programming MCQs MCQ: What will be the output of the following R code? function(p) { params[!fixed] ls(environment(nLL)) | Extra Education