Assignment on Vectors in R

Just now, I thought of an assignment using the concepts I learned in Vectors. Let’s start!
Problem:
Let’s plan what to cook for dinner this week. Weekends we usually eat out. So, let’s plan for 5 days(Monday – Friday).
Solution:
Let’s use the features we learned already.
1. Create 2 Vectors. One for the Entree and the another one for the sides. Let’s create one more Vector for the days in a week. How to create a Vector is posted here.
2. Name the Vector. It will help to display what to eat on what day. Read it here.
3. Accessing the elements of the Vector. Want to display what to eat on each day of the week. The content is here.

Now, Let’s run the above piece of code and check the output as below:
 That was fun, right?
Happy Coding!
0

Leave a Reply

Your email address will not be published. Required fields are marked *