|
data CLASS; *------------------------------------------------------------------------------; proc sort data=class; data counter; *------------------------------------------------------------------------------; proc sort data=class; data lowestheight;
|
|
Description: These SAS code snippets showcase techniques for creating subsets of data based on specific criteria. The code includes a counter and a subset of the lowest height. In the first code snippet: The proc sort procedure is used to sort the "class" dataset by the variables "sex," "height," "weight," and "name." In the second code snippet: The proc sort procedure is used to sort the "class" dataset by the variables "sex" and "height." |
|
|
|
Description: These R Tidyverse code snippets demonstrate techniques for creating subsets of data based on specific criteria, including the use of a counter and obtaining the subset of observations with the lowest height. In the first code snippet: The arrange function is used to sort the "class" dataframe in ascending order by the variables "Sex," "Height," "Weight," and "Name." In the second code snippet: The arrange function is used to sort the "class" dataframe in ascending order by the variables "Sex" and "Height." |