5.7 Selecting List Elements by Position 109
5.8 Selecting List Elements by Name 111
5.9 Building a Name/Value Association List 112
5.10 Removing an Element from a List 114
5.11 Flatten a List into a Vector 115
5.12 Removing NULL Elements from a List 116
5.13 Removing List Elements Using a Condition 117
5.14 Initializing a Matrix 118
5.15 Performing Matrix Operations 119
5.16 Giving Descriptive Names to the Rows and Columns of a Matrix 120
5.17 Selecting One Row or Column from a Matrix 121
5.18 Initializing a Data Frame from Column Data 122
5.19 Initializing a Data Frame from Row Data 123
5.20 Appending Rows to a Data Frame 125
5.21 Preallocating a Data Frame 126
5.22 Selecting Data Frame Columns by Position 127
5.23 Selecting Data Frame Columns by Name 131
5.24 Selecting Rows and Columns More Easily 132
5.25 Changing the Names of Data Frame Columns 133
5.26 Editing a Data Frame 135
5.27 Removing NAs from a Data Frame 136
5.28 Excluding Columns by Name 137
5.29 Combining Two Data Frames 138
5.30 Merging Data Frames by Common Column 140
5.31 Accessing Data Frame Contents More Easily 141
5.32 Converting One Atomic Value into Another 143
5.33 Converting One Structured Data Type into Another 144
6. Data Transformations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147
6.1 Splitting a Vector into Groups 148
6.2 Applying a Function to Each List Element 149
6.3 Applying a Function to Every Row 151
6.4 Applying a Function to Every Column 152
6.5 Applying a Function to Groups of Data 154
6.6 Applying a Function to Groups of Rows 156
6.7 Applying a Function to Parallel Vectors or Lists 158
7. Strings and Dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161
7.1 Getting the Length of a String 163
7.2 Concatenating Strings 163
7.3 Extracting Substrings 164
7.4 Splitting a String According to a Delimiter 165
7.5 Replacing Substrings 166
Table of Contents | vii
www.it-ebooks.info
评论0
最新资源