Загрузка страницы

do.call & call Functions in R (3 Examples) | How to Execute a Function by Its Name | eval Expression

How to run a function using its name within the do.call and call functions in the R programming language. More details: https://statisticsglobe.com/do-call-and-call-functions-in-r/
R code of this video:

x1 <- 1:10 # Example vector
x1 # Print example vector

do.call("sum", list(x1)) # Apply do.call

sum(x1) # Comparison with conventional syntax

x2 <- c(x1, NA) # Example vector with NA
x2 # Print example vector

do.call("sum", list(x2)) # Basic application of do.call

do.call("sum", list(x2, na.rm = TRUE)) # Specify additional arguments

my_call <- call("sum", x2, na.rm = TRUE) # Applying call function
my_call # Return output of call function

eval(my_call) # Apply eval function to call object

Follow me on Social Media:
Facebook: https://www.facebook.com/statisticsglobecom/
Patreon: https://www.patreon.com/statisticsglobe
Pinterest: https://www.pinterest.de/JoachimSchork
Reddit: https://www.reddit.com/user/JoachimSchork
Twitter: https://twitter.com/JoachimSchork

Видео do.call & call Functions in R (3 Examples) | How to Execute a Function by Its Name | eval Expression канала Statistics Globe
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
11 января 2021 г. 20:00:31
00:05:50
Другие видео канала
3 Simple Tips to Avoid Overplotting in R #shorts #rstats #programming #ggplot2 #datavisualization3 Simple Tips to Avoid Overplotting in R #shorts #rstats #programming #ggplot2 #datavisualizationCalculate Mean by Group in Python (2 Examples) | Average of Subgroups | groupby() & mean() FunctionsCalculate Mean by Group in Python (2 Examples) | Average of Subgroups | groupby() & mean() FunctionsDifference Between data.frame & as.data.frame Functions in R (2 Examples) | Create & Convert DataDifference Between data.frame & as.data.frame Functions in R (2 Examples) | Create & Convert DataLog Transformation of Data Frame in R (Example) | Convert All Values & Columns | Apply log FunctionLog Transformation of Data Frame in R (Example) | Convert All Values & Columns | Apply log FunctionSum of List Elements in R (2 Examples) | Calculate Within & Between | Reduce() & sapply() FunctionSum of List Elements in R (2 Examples) | Calculate Within & Between | Reduce() & sapply() FunctionIntroduction to the venn Package (6 Examples) | Draw Up to 7 Sets | Intersections, Labels & ColorsIntroduction to the venn Package (6 Examples) | Draw Up to 7 Sets | Intersections, Labels & ColorsAdd Subscript & Superscript to Labels of ggplot2 Facet Plot in R | labeller Argument in facet_wrapAdd Subscript & Superscript to Labels of ggplot2 Facet Plot in R | labeller Argument in facet_wrapWe Need to Talk About the Future of Statistics Globe on YouTubeWe Need to Talk About the Future of Statistics Globe on YouTubena.omit Function in R (Example) | Listwise Deletion | Data Frame & Vector | Remove Incomplete Casesna.omit Function in R (Example) | Listwise Deletion | Data Frame & Vector | Remove Incomplete CasesReplace NaN by Empty String in pandas DataFrame in Python (Example) | Substitute by Blank CharacterReplace NaN by Empty String in pandas DataFrame in Python (Example) | Substitute by Blank CharacterAdd Individual Text to Each Facet of ggplot2 Plot in R (Example) | annotate() & geom_text() FunctionAdd Individual Text to Each Facet of ggplot2 Plot in R (Example) | annotate() & geom_text() FunctionGet Function Parameters as List in R (Example) | Save Arguments & Input | environment() FunctionGet Function Parameters as List in R (Example) | Save Arguments & Input | environment() FunctionExtract Data Frame Rows that do not Match Logical Condition in R (Example) | Filter, Select & SubsetExtract Data Frame Rows that do not Match Logical Condition in R (Example) | Filter, Select & SubsetHow to Convert a Factor to Numeric in R (Example Code) | Vector & Data Frame Column | Keep NumbersHow to Convert a Factor to Numeric in R (Example Code) | Vector & Data Frame Column | Keep NumbersPython INTEGER Trick (EASY Life) !! #shorts #python #integers #pythonprogramming #programmingPython INTEGER Trick (EASY Life) !! #shorts #python #integers #pythonprogramming #programmingCalculate Cartesian Product in R (2 Examples) | expand.grid() & crossing() Functions | tidyr PackageCalculate Cartesian Product in R (2 Examples) | expand.grid() & crossing() Functions | tidyr PackageBest Generative AI DALL-E Prompts - Manga Comic Images! #AI #dalle #manga #anime #animeart #openaiBest Generative AI DALL-E Prompts - Manga Comic Images! #AI #dalle #manga #anime #animeart #openaiExtract Year and Month from yearmon Object in R | zoo & lubridate Packages | Using format() FunctionExtract Year and Month from yearmon Object in R | zoo & lubridate Packages | Using format() FunctionMean by Group in R (2 Examples) | dplyr Package vs. Base R | group_by() & summarise_at() FunctionsMean by Group in R (2 Examples) | dplyr Package vs. Base R | group_by() & summarise_at() FunctionsRemove Rows with Non-Numeric Characters (Example) | Drop & Delete | as.numeric() & is.na() FunctionsRemove Rows with Non-Numeric Characters (Example) | Drop & Delete | as.numeric() & is.na() FunctionsGet End of Month for Certain Date in R (Examples) | ceiling_date() & timeLastDayInMonth() FunctionsGet End of Month for Certain Date in R (Examples) | ceiling_date() & timeLastDayInMonth() Functions
Яндекс.Метрика