Suppose I define the following function in R

Untitled Forums Statistics R programming Suppose I define the following function in R

Tagged: 

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #15890
    nammy
    Participant

    Suppose I define the following function in R
    cube <- function(x, n) {

    x^3

    }
    What is the result of running
    cube(3)
    in R after defining this function?

    1. The number 27 is returned
    2. The users is prompted to specify the value of ‘n’.
    3. A warning is given with no value returned.
    4. An error is returned because ‘n’ is not specified in the call to ‘cube’
    #15891
    nammy
    Participant

    Answer:-1
    The number 27 is returned

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.