Here are the first letters of the names of several data verbs. (Repeated letters are for different verbs.) Complete the name and say briefly what the verb does.
Rather than looking at a list of verbs, do this just from memory.
Each of these tasks can be performed using a single data verb. For each task, say which verb it is:
These questions refer to the diamonds
data table. Take a look at the codebook (using help()
) so that you’ll understand the meaning of the tasks.1
Each of the following tasks can be accomplished by a statement of the form
diamonds %>%
verb1( args1 ) %>%
verb2( args2 ) %>%
arrange( args3 ) %>% head( 1 )
Identify the verbs and arguments.
Here is a small data table based on BabyNames
. Take this table as the input.
name | sex | count | year |
---|---|---|---|
Christina | M | 22 | 1967 |
Rotha | F | 7 | 1907 |
Wayman | M | 9 | 1997 |
Song | F | 11 | 1994 |
Julian | M | 535 | 1948 |
Vicky | F | 2945 | 1957 |
Kalia | F | 46 | 1989 |
Lissa | F | 102 | 1962 |
Brand | M | 10 | 1991 |
Josedejesus | M | 9 | 1985 |
Just by chance, this small sample pulled out the listing for Christina males.
For each of the following outputs, identify the operation and write down the details of the operation.
name | sex | count | year |
---|---|---|---|
Rotha | F | 7 | 1907 |
Song | F | 11 | 1994 |
Kalia | F | 46 | 1989 |
Lissa | F | 102 | 1962 |
Vicky | F | 2945 | 1957 |
Wayman | M | 9 | 1997 |
Josedejesus | M | 9 | 1985 |
Brand | M | 10 | 1991 |
Christina | M | 22 | 1967 |
Julian | M | 535 | 1948 |
name | sex | count | year |
---|---|---|---|
Rotha | F | 7 | 1907 |
Song | F | 11 | 1994 |
Vicky | F | 2945 | 1957 |
Kalia | F | 46 | 1989 |
Lissa | F | 102 | 1962 |
name | sex | count | year |
---|---|---|---|
Christina | M | 22 | 1967 |
Julian | M | 535 | 1948 |
total |
---|
3696 |
name | count |
---|---|
Christina | 22 |
Rotha | 7 |
Wayman | 9 |
Song | 11 |
Julian | 535 |
Vicky | 2945 |
Kalia | 46 |
Lissa | 102 |
Brand | 10 |
Josedejesus | 9 |
There’s only one data verb that takes a single data table as input and produce an output that (in general) has a different meaning to the case. Which one?
There’s only one data verb that takes two data tables as input rather than just a single data table. Which one?
Please use the comment system to make suggestions, point out errors, or to discuss the topic.
Motivated by this problem set based on drills by Garrett Grolemund which are licensed under the CC Attribution-Noncommercial-Share Alike 3.0 License.↩