filmov
tv
R programming Section 4. Advanced data management. Lecture 8. Aggregating data in R #rprogramming

Показать описание
R programming Section 4. Advanced data management. Lecture 8. Aggregating data in R.
You can produce summary statistics based on group of observations.
General format for aggregating is aggregate(x, by, FUN) , WHERE
x is the data object,
by is a list of variables that will be used to form groups of observations in x, and
FUN is the aggregation function.
Example: to calculate mean grades for student groups by Gender and Country
agg = aggregate(test, by = list(test$Gender,
#rprogramming
#rstudio
#function
#aggregate
#dataframe
#grouping
#rdatacode
You can produce summary statistics based on group of observations.
General format for aggregating is aggregate(x, by, FUN) , WHERE
x is the data object,
by is a list of variables that will be used to form groups of observations in x, and
FUN is the aggregation function.
Example: to calculate mean grades for student groups by Gender and Country
agg = aggregate(test, by = list(test$Gender,
#rprogramming
#rstudio
#function
#aggregate
#dataframe
#grouping
#rdatacode