Ask Question
30 June, 19:57

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. 30 June, 23:38
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers