filmov
tv
R Error in Function: Unused Argument (2 Examples) | How to Fix | Apply Manually Created Function

Показать описание
R code of this video:
my_fun1 <- function(x) { # Create user-defined function
x^2
}
my_fun1(x = 1, y = 2) # Try to apply user-defined function
my_fun2 <- function(x, ...) { # User-defined function with ...
x^2
}
my_fun2(x = 1, y = 2) # Properly apply user-defined function
Follow me on Social Media:
my_fun1 <- function(x) { # Create user-defined function
x^2
}
my_fun1(x = 1, y = 2) # Try to apply user-defined function
my_fun2 <- function(x, ...) { # User-defined function with ...
x^2
}
my_fun2(x = 1, y = 2) # Properly apply user-defined function
Follow me on Social Media: