filmov
tv
Use of apply Function in R | R for Beginners
Показать описание
This video is about the apply function in R. You will learn how to use apply function in R. Apply function in R can be used to perform an action to multiple rows and columns. So, this function is very helpful in R Programming. To get help on the use of apply() function in R, insert a question mark to it like ?apply(). The documentation on the use of this function will open in the help tab.
Following is the syntax of apply function:
apply(X, MARGIN, FUN, ..., simplify = TRUE)
Here, the first argument x stands for a data frame, array or a matrix. Margin indicates whether you want to apply function on rows or columns. Next argument is Fun which specifies the function you want to apply. For example, mean, sum or any other function. At the end, there are dot dot dot which specifies any extra argument related to the function.
Body weight data
R Code/Script used in this video
To learn the basics of R programming
#apply #rprogramming #rprogrammingforbeginners #rstats
Following is the syntax of apply function:
apply(X, MARGIN, FUN, ..., simplify = TRUE)
Here, the first argument x stands for a data frame, array or a matrix. Margin indicates whether you want to apply function on rows or columns. Next argument is Fun which specifies the function you want to apply. For example, mean, sum or any other function. At the end, there are dot dot dot which specifies any extra argument related to the function.
Body weight data
R Code/Script used in this video
To learn the basics of R programming
#apply #rprogramming #rprogrammingforbeginners #rstats