Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi, I am in difficulty when I kept trying to do these R programming questions. Could you give me a help to solve these questions?
Hi, I am in difficulty when I kept trying to do these R programming questions.
Could you give me a help to solve these questions?
Thank you so much.
\fCreate a vector called countries which contains the names of 5 countries that you would like to visit some day. Print out the elements of the vector. Print out the 4th element of the vector. Create a vector called nums which contains the numbers 6, 7, 8, 9,..., 199, 200 Use the sum() function to add up all of the values in mums. Use the mean() function to nd the average of all of the values in "mums. Create a vector called sleep which contains how many hours of sleep you get on each day of the week (starting with Monday). Create a vector called days which contains the names of the days of the week (starting with Monday). Use the names() function to set the names of the sleep vector to the values of the days vector. Show two different ways to print out the number of hours of sleep you get on a SundayStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started