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

preview_player
Показать описание
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:

Рекомендации по теме
join shbcf.ru