Ask Question
6 August, 07:56

5. Create a vector called to20 that goes from 1 to 20 (use the range notation). Now create a variable called end that goes from 40 to 50 (use the range notation). Now create a variable called to50 that combines to20, then the number 21 to 30 and then add thes end variable at the end. Now print the variable to50. It should output the numbers 1 through 30 and then 40 through 50, skipping 31-39.

+2
Answers (1)
  1. 6 August, 09:58
    0
    creating vector:

    code:

    to20 <-c (1:20) #creating to20 vector

    end <-c (40:50) #creating end vector

    to50 <-c (to20,21:30, end) # creating to50 vector

    print (to50) # printing to50 vector
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “5. Create a vector called to20 that goes from 1 to 20 (use the range notation). Now create a variable called end that goes from 40 to 50 ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers