stats(x, by)
x
| The data structure to compute the statistics. This can either be a vector, matrix (data sets are the columns), or a list (data sets are the components). |
by
|
If x is a vector, an optional vector
specifying the categories to divide x into separate data sets.
|
Statistics for a normal random sample of 200 observations: rnorm(200) -> zork stats(zork) -> look look Summary statistics for the components of the climate data: stats(climate) -> look look Just list the means of the climate variables (second row of look): look[2,] Statistics for the actuator thrust by pressure level (there are 10 different pressure levels). stats(actuator.calibrate$force,by=actuator.calibrate$pressure)