Question: 3 deck52 Build a data. frame to represent a standard deck of 52 playing cards. It should have 52 rows and one column for each

 3 deck52 Build a data. frame to represent a standard deck

3 deck52 Build a data. frame to represent a standard deck of 52 playing cards. It should have 52 rows and one column for each characteristic of a playing card: color C {"black", "red"}, suit C {"clubs", "spades", "diamonds", "hearts" }, name C {"ace", "2", "3", . . ., "king rank C {1,2,3, .... 12, 13), value C {1,2,3, ..., 9, 10, 10, 10,10 }. Instructions: 1. Clean. Stylish. (10 points) 2. (25 points) Build a vector with 52 elements for each column: color, suit, name, rank, value. Useful commands are c() and rep(). Being an expert with rep() will help on the final exam. Use data. frame () to combine the columns into a single data frame called deck52. Confirm that your data.frame has 52 rows and 5 columns. Run names (mydeck) and other comparison operators. Type help(Arithmetic) or help ("+") for arithmetic operators like | and *. We need %% for this assignment. Note the difference between %% and %/%. 4. (25 points) Calculate the probabilities below using R. The first one is an example. 6

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!