call a function with parameter in R
Code snippet on how to call a function with parameter in R
# To call a function with parameter in R
func_name <- function(parameter) {
# code
}
func_name(parameter)
This code defines a function, assigning it to the variable “func_name”. A parameter is provided, which will provide additional information to the code within the function. After defining the function, the function is called with the specified parameter. This will execute the code within the function, using the parameter to provide further instructions.