|
data CLASS; proc summary data=class; proc summary data=class nway;
|
|
Description: These SAS code snippets demonstrate how to perform summary statistics on variables in a dataset named "class" using the proc summary procedure. The results of the summary statistics are stored in separate output datasets named "stats01" and "stats02" for different variable configurations. In the first code snippet: The proc summary procedure is used to compute summary statistics on the variable "height" in the "class" dataset. In the second code snippet: The proc summary procedure is used to compute summary statistics on the variable "height" in the "class" dataset, grouped by the variable "sex". |
|
stats01<-summarize(class,n=n( ), mean=mean(Height),sd=sd(Height)) stats02<-class %>%
|
|
Description: These R Tidyverse code snippets demonstrate how to compute summary statistics on variables in a data frame named "class" using different functions. The results of the summary statistics are stored in separate data frames named "stats01" and "stats02" for different variable configurations. In the first code snippet: The summarize function is used to compute summary statistics on the variable "Height" in the "class" data frame. In the second code snippet: The %>% operator is used to pipe the "class" data frame into a sequence of operations. |