Question: Question 1 ( More practice on the binary operators ) Prof. Lee is taking his friends and family to La Ronde, Montreal s iconic amusement
Question
More practice on the binary operators Prof. Lee is taking his friends and family to La Ronde, Montreals iconic amusement park. The heights of his group of people, measured in centimeters, are recorded in the following vector:
heights c
Prof. Lees group is eager to ride the roller coaster, but theres a catch: only those whose height falls between cm and cm are allowed on the ride. With this heartbreaking news, answer the following questions:
To quickly determine who meets the height requirement, Prof. Lee decides to assign each person a unique English letter. In R the LETTERS vector provides all the capital letters of the alphabet.
LETTERS
ABCDEFGH "I" JKLMNOPQRS
TUVWXYZ
Using LETTERS, find a simple way to assign A to Jin order to each member of the group. So youll have to have the following:
heights
A B C D E F G H I J
NOTE. Refrain from manually assigning characters to the group members onebyone.
Next, we need to determine who is too tall, too short, or appropriately sized for the ride. Using appropriate binary operators, create a new vector named heightseval. This vector should have the same indices as heights, with values assigned according to the following rules:
If the height is less than assign short
If the height is between and inclusive assign pass
If the height is greater than assign tall
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
