Introduction to DTwrappers
Introduction | Applications of DTwrapper functions | 1) Function: dt.choose.rows | Example 1a) Choose the first 3 rows of the dataset. | Example 1b) Choose rows based on a logical test | 2) Function: dt.choose.cols | Example 2a) Choose all of the columns for the first 5 rows. | Example 2b) Select a subset of the variables | Example 2c) Grouping data and choosing a subset of rows for each group | 3) Function: dt.count.rows | Example 3a) Counting the Number of Rows in a data set | Example 3b) Counting with filtering | Example 3c) Counting in groups | 4) Function: dt.define.variable | Example 4a) Creating a new variable by value | Example 4b) Creating a new variable with a calculated expression | Example 4c) Creating a new variable in subsets of rows | 5) Function: dt.remove.variables | Example 5) Removing a variable from a dataset | 6) Function: dt.sort | Example 6a) Sorting data by increasing values of a variable | Example 6b) Sorting data in decreasing order | Example 6c) Selecting the ordering of each sorting variable. | 7) Function: dt.calculate | Example 7a) Applying One Function to One Variable | Example 7b) Applying multiple functions to one variable | Example 7c) Adding parameters to the functions | Example 7d) dt.calculate with filtering and grouping statements | Example 7e) Applying multiple functions to multiple variables | Example 7f) Tables in wide format | Example 7g) Customized functions | Example 7h) Functions of multiple variables | Example 7i) Linear regression in subgroups | Conclusion