Ask 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 (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.

+4
Answers (1)
  1. 29 January, 18:54
    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 & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers