Question: a) (2 points) Create a data frame `df` with one numeric vector `indices` and two character vectors `firstNames` and `surnames` with length 5, respectively. The
a) (2 points) Create a data frame `df` with one numeric vector `indices` and two character vectors `firstNames` and `surnames` with length 5, respectively. The vector `indices` consists of randomly chosen values from 1 to 10 (the same values are NOT allowed to appear several times). The entries of `firstNames` are randomly chosen from the names 'Alex', 'Peter', 'Tom' (the same values are allowed to appear several times), and the entries of `surnames` are randomly chosen from the names 'James' and 'Miller' (the same values are allowed to appear several times)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
