Given: vector_1 that stores information about different colors of balls ( output of vector_1 is red ball,
Fantastic news! We've Found the answer you've been seeking!
Question:
Given:
- vector_1 that stores information about different colors of balls ( output of vector_1 is “red ball”, “green ball”, “yellow ball”.
- a separate data that has a code for balls (1st column) and the description (2nd column), see below:
RB red ball
GB green ball
YB yellow ball
Task: encode vector_1 to a format that can be compared with the string of the 1st column of the data set? Can use factor() function or other functions but no packages.
Related Book For
Introduction To Probability And Statistics
ISBN: 9780495389538
13th Edition
Authors: William Mendenhall, Robert J. Beaver, Barbara M. Beaver
Posted Date: