filmov
tv
Use of tapply() Function in R | R Programming for Beginners
Показать описание
This video is about tapply () function in R. You will learn how to use tapply function in rstudio. tapply function in R is used to apply a function to data separated by factors. If data contains factor and numeric variables, then we can use tapply function. You can also apply this function to multiple factor variables. Following is the syntax of tapply function:
tapply(X, INDEX, FUN = NULL, ..., default = NA, simplify = TRUE)
Here, the x is an object or variable we want to apply function. INDEX is one or more factor or grouping variables with same length of X. For example it may be a gender variable with 2 levels like male and female. Fun is the function we want to apply for example mean.
Rscript / codes used in this video:
Sheep data used in this video:
To learn basics of R Programming:
#tapply #rprogramming #rprogrammingforbeginners #rstats
tapply(X, INDEX, FUN = NULL, ..., default = NA, simplify = TRUE)
Here, the x is an object or variable we want to apply function. INDEX is one or more factor or grouping variables with same length of X. For example it may be a gender variable with 2 levels like male and female. Fun is the function we want to apply for example mean.
Rscript / codes used in this video:
Sheep data used in this video:
To learn basics of R Programming:
#tapply #rprogramming #rprogrammingforbeginners #rstats