How do you define a function in R?

How do you define a function in R?

a) function_name <- function()
b) function function_name()
c) def function_name()
d) func function_name()

Answer:

a) function_name <- function()

Explanation:

In R, a function is defined using the syntax function_name <- function(), where function() contains the function logic.

Reference:

R Programming – Functions MCQ Questions and Answers

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top